Fix test fails related to QTBUG-22237
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qsgpositioners / data / attachedproperties-column.qml
1 import QtQuick 2.0
2
3 Rectangle {
4   width: 100
5   height: 200
6
7   Column {
8
9     Rectangle {
10       width: 100
11       height: 100
12       color: 'red'
13       visible: false
14     }
15
16     Rectangle {
17       objectName: "greenRect"
18       width: 100
19       height: 100
20       color: 'green'
21       property int posIndex: Positioner.index
22       property bool isFirstItem: Positioner.isFirstItem
23       property bool isLastItem: Positioner.isLastItem
24     }
25
26     Rectangle {
27       width: 100
28       height: 100
29       color: 'blue'
30       visible: false
31     }
32
33     Rectangle {
34       objectName: "yellowRect"
35       width: 100
36       height: 100
37       color: 'yellow'
38
39       property int posIndex: -1
40       property bool isFirstItem: false
41       property bool isLastItem: false
42
43       function onDemandPositioner() {
44         posIndex = Positioner.index;
45         isFirstItem = Positioner.isFirstItem
46         isLastItem = Positioner.isLastItem
47       }
48     }
49   }
50 }