diff options
Diffstat (limited to 'tests/auto/quick/qquickstates/data/parentChangeInvolvingBindings.qml')
-rw-r--r-- | tests/auto/quick/qquickstates/data/parentChangeInvolvingBindings.qml | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickstates/data/parentChangeInvolvingBindings.qml b/tests/auto/quick/qquickstates/data/parentChangeInvolvingBindings.qml new file mode 100644 index 0000000000..d3873883cd --- /dev/null +++ b/tests/auto/quick/qquickstates/data/parentChangeInvolvingBindings.qml @@ -0,0 +1,43 @@ +import QtQuick + +Item { + id: root + property alias childWidth: firstChild.width + property alias childX: firstChild.x + property alias childRotation: firstChild.rotation + property double myrotation: 100 + property double myrotation2: 200 + height: 400 + y: 40 + + Item { + id: firstChild + height: parent.height + width: height + y: parent.y + x: y + rotation: root.myrotation + + Item { + id: inner + anchors.fill: parent + } + } + + states: State { + name: "reparented" + ParentChange { + target: firstChild + parent: otherChild + width: 2 *height + x: 2 * y + rotation: root.myrotation2 + } + } + + Item { + height: parent.height + y: parent.y + id: otherChild + } +} |