Fix test fails related to QTBUG-22237
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qsggridview / data / margins.qml
1 import QtQuick 2.0
2
3 Rectangle {
4     id: root
5
6     width: 240
7     height: 320
8     color: "#ffffff"
9     Component {
10         id: myDelegate
11         Rectangle {
12             id: wrapper
13             objectName: "wrapper"
14             width: 100
15             height: 80
16             border.color: "blue"
17             property string name: model.name
18             Text {
19                 text: index
20             }
21             Text {
22                 x: 40
23                 text: wrapper.x + ", " + wrapper.y
24             }
25             Text {
26                 y: 20
27                 id: textName
28                 objectName: "textName"
29                 text: name
30             }
31             Text {
32                 y: 40
33                 id: textNumber
34                 objectName: "textNumber"
35                 text: number
36             }
37             color: GridView.isCurrentItem ? "lightsteelblue" : "white"
38         }
39     }
40     GridView {
41         id: grid
42         objectName: "grid"
43         width: 240
44         height: 320
45         cellWidth: 100
46         cellHeight: 80
47         leftMargin: 30
48         rightMargin: 50
49         flow: GridView.TopToBottom
50         layoutDirection: (testRightToLeft == true) ? Qt.RightToLeft : Qt.LeftToRight
51         model: testModel
52         delegate: myDelegate
53     }
54     Text { anchors.bottom: parent.bottom; text: grid.contentX }
55 }