summaryrefslogtreecommitdiffstats
path: root/examples/declarative/listview
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-09-09 05:46:47 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-09-09 05:46:47 (GMT)
commitccccc25802bdd0af806c3a1aaa83759b9e6706de (patch)
tree7a243fcd452e9b3c90ff5097218d337c442bf3a7 /examples/declarative/listview
parented8e89eaddca1c508151ef5913f0d383d3071b99 (diff)
downloadQt-ccccc25802bdd0af806c3a1aaa83759b9e6706de.zip
Qt-ccccc25802bdd0af806c3a1aaa83759b9e6706de.tar.gz
Qt-ccccc25802bdd0af806c3a1aaa83759b9e6706de.tar.bz2
clearer example
Diffstat (limited to 'examples/declarative/listview')
-rw-r--r--examples/declarative/listview/dynamic.qml16
1 files changed, 12 insertions, 4 deletions
diff --git a/examples/declarative/listview/dynamic.qml b/examples/declarative/listview/dynamic.qml
index 5111cec..f615c24 100644
--- a/examples/declarative/listview/dynamic.qml
+++ b/examples/declarative/listview/dynamic.qml
@@ -1,7 +1,7 @@
import Qt 4.6
Item {
- width: 300
+ width: 320
height: 500
ListModel {
@@ -114,15 +114,23 @@ Item {
MouseRegion { anchors.fill: parent;
onClicked: {
FruitModel.append({
- "name":"Pizza",
+ "name":"Pizza Margarita",
"cost":5.95,
- "attributes":[{"description": "Supreme"},{"description": "Margarita"}]
+ "attributes":[{"description": "Cheese"},{"description": "Tomato"}]
})
}
}
}
Image { source: "content/pics/add.png"
- MouseRegion { anchors.fill: parent; onClicked: FruitModel.insert(0,{"name":"Pizza", "cost":5.95}) }
+ MouseRegion { anchors.fill: parent;
+ onClicked: {
+ FruitModel.insert(0,{
+ "name":"Pizza Supreme",
+ "cost":9.95,
+ "attributes":[{"description": "Cheese"},{"description": "Tomato"},{"description": "The Works"}]
+ })
+ }
+ }
}
Image { source: "content/pics/trash.png"
MouseRegion { anchors.fill: parent; onClicked: FruitModel.clear() }