Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativegridview / data / gridview2.qml
1 import QtQuick 1.0
2
3 GridView {
4     anchors.fill: parent
5     width: 320; height: 200
6     cellWidth: 100; cellHeight: 100; cacheBuffer: 200; focus: true
7     keyNavigationWraps: true; highlightFollowsCurrentItem: false
8
9     model: ListModel {
10         id: appModel
11         ListElement { lColor: "red" }
12         ListElement { lColor: "yellow" }
13         ListElement { lColor: "green" }
14         ListElement { lColor: "blue" }
15     }
16
17     delegate: Item {
18         width: 100; height: 100
19         Rectangle {
20             color: lColor; x: 4; y: 4
21             width: 92; height: 92
22         }
23     }
24
25     highlight: Rectangle { width: 100; height: 100; color: "black" }
26 }