diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-02-28 17:48:06 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-03-01 12:37:47 +0000 |
commit | 5174504fd77c1c68b1eaf190894246e5185e9474 (patch) | |
tree | c07590ca7989ba1d8508158bc6e84a52195f2fd8 /tests/auto/quick/qquickstates/data/parentChangeInvolvingBindings.qml | |
parent | ae7923fb380834dbe54a5eaa6f20ffaff10fd40c (diff) |
QQuickStateOperations: updateGeometry() when setting x/y/w/h
Failing to call updateGeometry() and setting the various dirty flags
leads to inconsistent state.
Fixes: QTBUG-99436
Fixes: QTBUG-98857
Change-Id: I15240b1670947da29e2f05e7ea41c7586f0b987a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit b81e27e65217f8425acb58c3ac848c728790c872)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/quick/qquickstates/data/parentChangeInvolvingBindings.qml')
-rw-r--r-- | tests/auto/quick/qquickstates/data/parentChangeInvolvingBindings.qml | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/auto/quick/qquickstates/data/parentChangeInvolvingBindings.qml b/tests/auto/quick/qquickstates/data/parentChangeInvolvingBindings.qml index 9680e806b8..d3873883cd 100644 --- a/tests/auto/quick/qquickstates/data/parentChangeInvolvingBindings.qml +++ b/tests/auto/quick/qquickstates/data/parentChangeInvolvingBindings.qml @@ -3,25 +3,41 @@ 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; rotation: root.myrotation2} + ParentChange { + target: firstChild + parent: otherChild + width: 2 *height + x: 2 * y + rotation: root.myrotation2 + } } Item { height: parent.height + y: parent.y id: otherChild } } |