diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-10-28 09:34:00 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-11-03 09:14:48 +0100 |
commit | d7862eac1b09f9fb28e540970d5cc98cb6479c52 (patch) | |
tree | 46ff6bc99d2b8aafcc60c766973a3e9c04529bdf /examples/quick/animation/states | |
parent | 2a60d5eb1c06b9a3b36af324a8c44bdc0cb9d523 (diff) |
Update examples to use new PropertyChanges
Also, prefer the multi-line syntax over ';'-separated bindings for
readability.
Change-Id: I3d6eb854e514ee257ca83773a11e6e9e10770bff
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quick/animation/states')
-rw-r--r-- | examples/quick/animation/states/states.qml | 14 | ||||
-rw-r--r-- | examples/quick/animation/states/transitions.qml | 14 |
2 files changed, 24 insertions, 4 deletions
diff --git a/examples/quick/animation/states/states.qml b/examples/quick/animation/states/states.qml index 5ff8e5318c..1b90cacb82 100644 --- a/examples/quick/animation/states/states.qml +++ b/examples/quick/animation/states/states.qml @@ -101,13 +101,23 @@ Rectangle { // In state 'middleRight', move the image to middleRightRect State { name: "middleRight" - PropertyChanges { target: userIcon; x: middleRightRect.x; y: middleRightRect.y } + PropertyChanges { + userIcon { + x: middleRightRect.x + y: middleRightRect.y + } + } }, // In state 'bottomLeft', move the image to bottomLeftRect State { name: "bottomLeft" - PropertyChanges { target: userIcon; x: bottomLeftRect.x; y: bottomLeftRect.y } + PropertyChanges { + userIcon { + x: bottomLeftRect.x + y: bottomLeftRect.y + } + } } // ![0] ] diff --git a/examples/quick/animation/states/transitions.qml b/examples/quick/animation/states/transitions.qml index 1cfdfec18a..a4e0f218c7 100644 --- a/examples/quick/animation/states/transitions.qml +++ b/examples/quick/animation/states/transitions.qml @@ -105,13 +105,23 @@ Rectangle { // In state 'middleRight', move the image to middleRightRect State { name: "middleRight" - PropertyChanges { target: userIcon; x: middleRightRect.x; y: middleRightRect.y } + PropertyChanges { + userIcon { + x: middleRightRect.x + y: middleRightRect.y + } + } }, // In state 'bottomLeft', move the image to bottomLeftRect State { name: "bottomLeft" - PropertyChanges { target: userIcon; x: bottomLeftRect.x; y: bottomLeftRect.y } + PropertyChanges { + userIcon { + x: bottomLeftRect.x + y: bottomLeftRect.y + } + } } ] |