tests/auto/declarative/qdeclarativegridview/data/gridview2.qml
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
       
     1 import Qt 4.7
       
     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 }