diff options
Diffstat (limited to 'tests/auto/qtquick2/qquickpositioners/data/attachedproperties-dynamic.qml')
-rw-r--r-- | tests/auto/qtquick2/qquickpositioners/data/attachedproperties-dynamic.qml | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/auto/qtquick2/qquickpositioners/data/attachedproperties-dynamic.qml b/tests/auto/qtquick2/qquickpositioners/data/attachedproperties-dynamic.qml new file mode 100644 index 0000000000..894749dc16 --- /dev/null +++ b/tests/auto/qtquick2/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(); + } + } +} |