summaryrefslogtreecommitdiffstats
path: root/examples/declarative/listview
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-09-07 03:06:10 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-09-07 03:06:10 (GMT)
commitbb6fb2bb9e329024f617369dc3ae9dde2963287b (patch)
tree28d44cfa7214147a3fa7a90deef35280d52ab67d /examples/declarative/listview
parent997cec43fd789917fa038b3a963d2ad19d3bd682 (diff)
downloadQt-bb6fb2bb9e329024f617369dc3ae9dde2963287b.zip
Qt-bb6fb2bb9e329024f617369dc3ae9dde2963287b.tar.gz
Qt-bb6fb2bb9e329024f617369dc3ae9dde2963287b.tar.bz2
Use data as the default property of the views.
Diffstat (limited to 'examples/declarative/listview')
-rw-r--r--examples/declarative/listview/listview.qml21
1 files changed, 9 insertions, 12 deletions
diff --git a/examples/declarative/listview/listview.qml b/examples/declarative/listview/listview.qml
index 0f197b4..1cca5ad 100644
--- a/examples/declarative/listview/listview.qml
+++ b/examples/declarative/listview/listview.qml
@@ -66,17 +66,14 @@ Rectangle {
model: MyPetsModel; delegate: PetDelegate
currentItemPositioning: "SnapAuto"; snapPosition: 125
currentIndex: List1.currentIndex
- children: [
- // Position a static highlight rather than a normal highlight so that
- // when the view is flicked, the highlight does not move.
- // By positioning the highlight at the same position as the snapPosition
- // the item under the highlight will always be the current item.
- // Note that we specify the 'children' property. This is because
- // the default property of a ListView is 'delegate'.
- Rectangle {
- y: 125; width: 200; height: 50
- color: "#FFFF88"; z: -1
- }
- ]
+
+ // Position a static highlight rather than a normal highlight so that
+ // when the view is flicked, the highlight does not move.
+ // By positioning the highlight at the same position as the snapPosition
+ // the item under the highlight will always be the current item.
+ Rectangle {
+ y: 125; width: 200; height: 50
+ color: "#FFFF88"; z: -1
+ }
}
}