Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativepositioners / data / repeatertest.qml
1 import QtQuick 1.0
2
3 Item {
4     width: 640
5     height: 480
6     Row {
7         Repeater{ model: 3;
8             delegate: Component {
9                 Rectangle {
10                     color: "red"
11                     width: 50
12                     height: 50
13                     z: {if(index == 0){2;}else if(index == 1){1;} else{3;}}
14                     objectName: {if(index == 0){"one";}else if(index == 1){"two";} else{"three";}}
15                 }
16             }
17         }
18     }
19
20     //This crashed once (QTBUG-16959) because the repeater ended up on the end of the list
21     //If this grid just instantiates without crashing, then it has not regressed.
22     Grid {
23         id: grid
24         rows: 2
25         flow: Grid.TopToBottom
26
27         Repeater {
28             model: 13
29             Rectangle {
30                 color: "goldenrod"
31                 width: 100
32                 height: 100
33                 radius: 10
34                 border.width: 1
35             }
36         }
37     }
38 }