diff options
author | David Boddie <david.boddie@nokia.com> | 2011-01-21 15:10:54 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-01-21 15:10:54 (GMT) |
commit | 84a1df764bf2e29e9e6e43f4f0e1a69201199fbc (patch) | |
tree | 73ece498671d7c7ed1df50c9a28b6be0fdfc892b /doc/src/snippets/declarative/propertyanimation.qml | |
parent | 2d5d354068e18de999c0316c2356726f9fe69fca (diff) | |
download | Qt-84a1df764bf2e29e9e6e43f4f0e1a69201199fbc.zip Qt-84a1df764bf2e29e9e6e43f4f0e1a69201199fbc.tar.gz Qt-84a1df764bf2e29e9e6e43f4f0e1a69201199fbc.tar.bz2 |
Doc: Fixed the syntax of QML code snippets.
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 1f1cbaf..30eeba8 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] } |