diff options
author | Ulf Hermann <[email protected]> | 2021-10-28 09:34:00 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2021-11-03 09:14:48 +0100 |
commit | d7862eac1b09f9fb28e540970d5cc98cb6479c52 (patch) | |
tree | 46ff6bc99d2b8aafcc60c766973a3e9c04529bdf /examples/quick/customitems | |
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 <[email protected]>
Diffstat (limited to 'examples/quick/customitems')
4 files changed, 17 insertions, 9 deletions
diff --git a/examples/quick/customitems/flipable/Card.qml b/examples/quick/customitems/flipable/Card.qml index bc50bbe473..3ecf017d6c 100644 --- a/examples/quick/customitems/flipable/Card.qml +++ b/examples/quick/customitems/flipable/Card.qml @@ -75,7 +75,7 @@ Flipable { states: State { name: "back"; when: container.flipped - PropertyChanges { target: rotation; angle: container.angle } + PropertyChanges { rotation.angle: container.angle } } transitions: Transition { diff --git a/examples/quick/customitems/scrollbar/main.qml b/examples/quick/customitems/scrollbar/main.qml index 9248e44a42..f0a2cff50a 100644 --- a/examples/quick/customitems/scrollbar/main.qml +++ b/examples/quick/customitems/scrollbar/main.qml @@ -71,8 +71,10 @@ Rectangle { states: State { name: "ShowBars" when: view.movingVertically || view.movingHorizontally - PropertyChanges { target: verticalScrollBar; opacity: 1 } - PropertyChanges { target: horizontalScrollBar; opacity: 1 } + PropertyChanges { + verticalScrollBar.opacity: 1 + horizontalScrollBar.opacity: 1 + } } transitions: Transition { diff --git a/examples/quick/customitems/searchbox/SearchBox.qml b/examples/quick/customitems/searchbox/SearchBox.qml index 13927e0d6f..99eff06529 100644 --- a/examples/quick/customitems/searchbox/SearchBox.qml +++ b/examples/quick/customitems/searchbox/SearchBox.qml @@ -102,8 +102,10 @@ FocusScope { states: State { name: "hasText"; when: textInput.text != '' - PropertyChanges { target: typeSomething; opacity: 0 } - PropertyChanges { target: clear; opacity: 1 } + PropertyChanges { + typeSomething.opacity: 0 + clear.opacity: 1 + } } transitions: [ diff --git a/examples/quick/customitems/slideswitch/content/Switch.qml b/examples/quick/customitems/slideswitch/content/Switch.qml index 72eb13e1e3..43c06f2105 100644 --- a/examples/quick/customitems/slideswitch/content/Switch.qml +++ b/examples/quick/customitems/slideswitch/content/Switch.qml @@ -107,13 +107,17 @@ Item { states: [ State { name: "on" - PropertyChanges { target: knob; x: 78 } - PropertyChanges { target: toggleswitch; on: true } + PropertyChanges { + knob.x: 78 + toggleswitch.on: true + } }, State { name: "off" - PropertyChanges { target: knob; x: 1 } - PropertyChanges { target: toggleswitch; on: false } + PropertyChanges { + knob.x: 1 + toggleswitch.on: false + } } ] //![6] |