aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickpositioners/data/attachedproperties-dynamic.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickpositioners/data/attachedproperties-dynamic.qml')
-rw-r--r--tests/auto/quick/qquickpositioners/data/attachedproperties-dynamic.qml44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickpositioners/data/attachedproperties-dynamic.qml b/tests/auto/quick/qquickpositioners/data/attachedproperties-dynamic.qml
new file mode 100644
index 0000000000..894749dc16
--- /dev/null
+++ b/tests/auto/quick/qquickpositioners/data/attachedproperties-dynamic.qml
@@ -0,0 +1,44 @@
+import QtQuick 2.0
+
+Rectangle
+{
+ width: 300
+ height: 100
+
+ Row {
+ id: pos
+ objectName: "pos"
+ anchors.fill: parent
+
+ Rectangle {
+ objectName: "rect0"
+ width: 100
+ height: 100
+ color: 'red'
+ property int index: Positioner.index
+ property bool firstItem: Positioner.isFirstItem
+ property bool lastItem: Positioner.isLastItem
+ }
+
+ Rectangle {
+ objectName: "rect1"
+ width: 100
+ height: 100
+ color: 'green'
+ property int index: Positioner.index
+ property bool firstItem: Positioner.isFirstItem
+ property bool lastItem: Positioner.isLastItem
+ }
+
+ property QtObject subRect;
+
+ function createSubRect() {
+ var component = Qt.createComponent("rectangleComponent.qml");
+ subRect = component.createObject(pos, {});
+ }
+
+ function destroySubRect() {
+ subRect.destroy();
+ }
+ }
+}