tests/auto/declarative/qdeclarativegridview/data/displaygrid.qml
changeset 30 5dc02b23752f
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
       
     1 import Qt 4.7
       
     2 
       
     3 Rectangle {
       
     4     width: 240
       
     5     height: 320
       
     6     color: "#ffffff"
       
     7     resources: [
       
     8         Component {
       
     9             id: myDelegate
       
    10             Rectangle {
       
    11                 id: wrapper
       
    12                 objectName: "wrapper"
       
    13                 width: 80
       
    14                 height: 60
       
    15                 border.color: "blue"
       
    16                 Text {
       
    17                     text: index
       
    18                 }
       
    19                 Text {
       
    20                     y: 20
       
    21                     id: displayText
       
    22                     objectName: "displayText"
       
    23                     text: display
       
    24                 }
       
    25                 color: GridView.isCurrentItem ? "lightsteelblue" : "white"
       
    26             }
       
    27         }
       
    28     ]
       
    29     GridView {
       
    30         id: grid
       
    31         objectName: "grid"
       
    32         width: 240
       
    33         height: 320
       
    34         cellWidth: 80
       
    35         cellHeight: 60
       
    36         model: testModel
       
    37         delegate: myDelegate
       
    38     }
       
    39 }