tests/auto/declarative/qdeclarativegridview/data/setindex.qml
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
       
     1 import Qt 4.7
       
     2 
       
     3 Rectangle {
       
     4     width: 200
       
     5     height: 200
       
     6     Component {
       
     7         id: appDelegate
       
     8 
       
     9         Item {
       
    10             id : wrapper
       
    11              function startupFunction() {
       
    12                  if (index == 5) view.currentIndex = index;
       
    13              }
       
    14             Component.onCompleted: startupFunction();
       
    15             width: 30; height: 30
       
    16             Text { text: index }
       
    17         }
       
    18     }
       
    19 
       
    20     GridView {
       
    21         id: view
       
    22         objectName: "grid"
       
    23         anchors.fill: parent
       
    24         cellWidth: 30; cellHeight: 30
       
    25         model: 35
       
    26         delegate: appDelegate
       
    27         focus: true
       
    28     }
       
    29 }