10-22-2012 10:34 AM
Hi,
Does anyone know how to make this work in C++? My trouble is coming on the Item's description and status. Is there any way that I can customize it such as:
GroupDataModel temp = new GroupDataModel(QStringList << employeeid)
temp.setItemDescription(QStringList << employeeDescription);
temp.setItemStatus(QStringList << employeeSalary);
I've scoured the docs to no avail.
import bb.cascades 1.0
Page {
content: Container {
// Create a ListView that uses an XML data model
ListView {
dataModel: XmlDataModel {
source: "models/items.xml"
}
listItemComponents: [
ListItemComponent {
type: "header"
// Use a predefined Header to represent "header"
// items
Header {
title: ListItemData.title
subtitle: ListItemData.subtitle
}
},
ListItemComponent {
type: "listItem"
// Use a predefined StandardListItem to represent "listItem"
// items
StandardListItem {
title: ListItemData.title
description: ListItemData.subtitle
status: ListItemData.status
}
} // end of second ListItemComponent
] // end of listItemComponents list
} // end of ListView
} // end of Container
} // end of Page
Solved! Go to Solution.
10-22-2012 12:03 PM
I have solved my own problem. See the sample app (Cascades cookbook)!