diff options
Diffstat (limited to 'doc/src/snippets/declarative/propertyanimation.qml')
-rw-r--r-- | doc/src/snippets/declarative/propertyanimation.qml | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/doc/src/snippets/declarative/propertyanimation.qml b/doc/src/snippets/declarative/propertyanimation.qml index d0a009a..711feec 100644 --- a/doc/src/snippets/declarative/propertyanimation.qml +++ b/doc/src/snippets/declarative/propertyanimation.qml @@ -48,10 +48,12 @@ Rectangle { width: 100; height: 100 color: "red" + //! [single state] states: State { name: "moved" PropertyChanges { target: rect; x: 50 } } + //! [single state] transitions: Transition { PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } @@ -83,18 +85,16 @@ Rectangle { } //![propertyvaluesource] -//![standalone] -Rectangle { - id: theRect - width: 100; height: 100 - color: "red" - - // this is a standalone animation, it's not running by default - PropertyAnimation { id: animation; target: theRect; property: "width"; to: 30; duration: 500 } - - MouseArea { anchors.fill: parent; onClicked: animation.running = true } -} -//![standalone] + //![standalone] + Rectangle { + id: theRect + width: 100; height: 100 + color: "red" + // this is a standalone animation, it's not running by default + PropertyAnimation { id: animation; target: theRect; property: "width"; to: 30; duration: 500 } + MouseArea { anchors.fill: parent; onClicked: animation.running = true } + } + //![standalone] } |