summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/transition.qml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/declarative/transition.qml')
-rw-r--r--doc/src/snippets/declarative/transition.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/src/snippets/declarative/transition.qml b/doc/src/snippets/declarative/transition.qml
index b884750..098d509 100644
--- a/doc/src/snippets/declarative/transition.qml
+++ b/doc/src/snippets/declarative/transition.qml
@@ -46,13 +46,18 @@ Rectangle {
width: 100; height: 100
color: "red"
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ }
+
states: State {
- name: "moved"
+ name: "moved"; when: mouseArea.pressed
PropertyChanges { target: rect; x: 50; y: 50 }
}
transitions: Transition {
- PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad }
+ NumberAnimation { properties: "x,y"; easing.type: Easing.InOutQuad }
}
}
//![0]