aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qquickpositioners/data/attachedproperties-row.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qquickpositioners/data/attachedproperties-row.qml')
-rw-r--r--tests/auto/declarative/qquickpositioners/data/attachedproperties-row.qml50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/auto/declarative/qquickpositioners/data/attachedproperties-row.qml b/tests/auto/declarative/qquickpositioners/data/attachedproperties-row.qml
new file mode 100644
index 0000000000..212a26b431
--- /dev/null
+++ b/tests/auto/declarative/qquickpositioners/data/attachedproperties-row.qml
@@ -0,0 +1,50 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 200
+ height: 100
+
+ Row {
+
+ Rectangle {
+ width: 100
+ height: 100
+ color: 'red'
+ visible: false
+ }
+
+ Rectangle {
+ objectName: "greenRect"
+ width: 100
+ height: 100
+ color: 'green'
+ property int posIndex: Positioner.index
+ property bool isFirstItem: Positioner.isFirstItem
+ property bool isLastItem: Positioner.isLastItem
+ }
+
+ Rectangle {
+ width: 100
+ height: 100
+ color: 'blue'
+ visible: false
+ }
+
+ Rectangle {
+ objectName: "yellowRect"
+ width: 100
+ height: 100
+ color: 'yellow'
+
+ property int posIndex: -1
+ property bool isFirstItem: false
+ property bool isLastItem: false
+
+ function onDemandPositioner() {
+ posIndex = Positioner.index;
+ isFirstItem = Positioner.isFirstItem
+ isLastItem = Positioner.isLastItem
+ }
+ }
+ }
+}