diff options
Diffstat (limited to 'examples/declarative/velocity/velocity.qml')
-rw-r--r-- | examples/declarative/velocity/velocity.qml | 51 |
1 files changed, 40 insertions, 11 deletions
diff --git a/examples/declarative/velocity/velocity.qml b/examples/declarative/velocity/velocity.qml index 20821d6..871bafc 100644 --- a/examples/declarative/velocity/velocity.qml +++ b/examples/declarative/velocity/velocity.qml @@ -1,46 +1,75 @@ import Qt 4.7 Rectangle { - width: 800; height: 480; color: "#464646" + width: 800; height: 480 + color: "#464646" ListModel { id: list + ListElement { name: "Sunday" - notes: [ ListElement { noteText: "Lunch" }, ListElement { noteText: "Birthday Party" } ] + notes: [ + ListElement { noteText: "Lunch" }, + ListElement { noteText: "Birthday Party" } + ] } + ListElement { name: "Monday" - notes: [ ListElement { noteText: "Pickup kids from\nschool\n4.30pm" }, - ListElement { noteText: "Checkout Qt" }, ListElement { noteText: "Read email" } ] + notes: [ + ListElement { noteText: "Pickup kids from\nschool\n4.30pm" }, + ListElement { noteText: "Checkout Qt" }, ListElement { noteText: "Read email" } + ] } + ListElement { name: "Tuesday" - notes: [ ListElement { noteText: "Walk dog" }, ListElement { noteText: "Buy newspaper" } ] + notes: [ + ListElement { noteText: "Walk dog" }, + ListElement { noteText: "Buy newspaper" } + ] } + ListElement { - name: "Wednesday"; notes: [ ListElement { noteText: "Cook dinner" } ] + name: "Wednesday" + notes: [ ListElement { noteText: "Cook dinner" } ] } + ListElement { name: "Thursday" - notes: [ ListElement { noteText: "Meeting\n5.30pm" }, ListElement { noteText: "Weed garden" } ] + notes: [ + ListElement { noteText: "Meeting\n5.30pm" }, + ListElement { noteText: "Weed garden" } + ] } + ListElement { name: "Friday" - notes: [ ListElement { noteText: "More work" }, ListElement { noteText: "Grocery shopping" } ] + notes: [ + ListElement { noteText: "More work" }, + ListElement { noteText: "Grocery shopping" } + ] } + ListElement { name: "Saturday" - notes: [ ListElement { noteText: "Drink" }, ListElement { noteText: "Download Qt\nPlay with QML" } ] + notes: [ + ListElement { noteText: "Drink" }, + ListElement { noteText: "Download Qt\nPlay with QML" } + ] } } ListView { id: flickable - anchors.fill: parent; focus: true - model: list; delegate: Day { } + + anchors.fill: parent + focus: true highlightRangeMode: ListView.StrictlyEnforceRange orientation: ListView.Horizontal snapMode: ListView.SnapOneItem + model: list + delegate: Day { } } } |