diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2011-02-10 22:35:31 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2011-02-10 22:35:31 (GMT) |
commit | ca13ba801144763b1ca7c39b2ef8594de94e2d3e (patch) | |
tree | 7600e31df6ce715a5bc28c0c97983bac9484c7cb /doc/src/snippets/declarative/propertyaction.qml | |
parent | ab38731fe5dcfaa1a7a70bc290a8856b5b01524d (diff) | |
parent | ec20a6da3edea3031f1705c3b13e24dc2c7c6de5 (diff) | |
download | Qt-ca13ba801144763b1ca7c39b2ef8594de94e2d3e.zip Qt-ca13ba801144763b1ca7c39b2ef8594de94e2d3e.tar.gz Qt-ca13ba801144763b1ca7c39b2ef8594de94e2d3e.tar.bz2 |
Merge remote-tracking branch 'origin/4.7' into HEAD
Diffstat (limited to 'doc/src/snippets/declarative/propertyaction.qml')
-rw-r--r-- | doc/src/snippets/declarative/propertyaction.qml | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/doc/src/snippets/declarative/propertyaction.qml b/doc/src/snippets/declarative/propertyaction.qml index dd21d14..f5ae798 100644 --- a/doc/src/snippets/declarative/propertyaction.qml +++ b/doc/src/snippets/declarative/propertyaction.qml @@ -41,45 +41,43 @@ import QtQuick 1.0 Row { -//![transition] -Item { - width: 400; height: 400 + //![transition] + Item { + width: 400; height: 400 - Rectangle { - id: rect - width: 200; height: 100 - color: "red" + Rectangle { + id: rect + width: 200; height: 100 + color: "red" - states: State { - name: "rotated" - PropertyChanges { target: rect; rotation: 180; transformOrigin: Item.BottomRight } - } + states: State { + name: "rotated" + PropertyChanges { target: rect; rotation: 180; transformOrigin: Item.BottomRight } + } - transitions: Transition { - RotationAnimation { duration: 1000; direction: RotationAnimation.Counterclockwise } - } + transitions: Transition { + RotationAnimation { duration: 1000; direction: RotationAnimation.Counterclockwise } + } - MouseArea { - anchors.fill: parent - onClicked: rect.state = "rotated" + MouseArea { + anchors.fill: parent + onClicked: rect.state = "rotated" + } } } -} -//![transition] + //![transition] -Item { - width: 300; height: 300 + Item { + width: 300; height: 300 - Image { id: img; source: "pics/qt.png" } - -//![standalone] -SequentialAnimation { - PropertyAction { target: img; property: "smooth"; value: "true" } - NumberAnimation { target: img; property: "width"; to: 300; duration: 1000 } - PropertyAction { target: img; property: "smooth"; value: "false" } -} -//![standalone] -} + Image { id: img; source: "pics/qt.png" } + //![standalone] + SequentialAnimation { + PropertyAction { target: img; property: "smooth"; value: "true" } + NumberAnimation { target: img; property: "width"; to: 300; duration: 1000 } + PropertyAction { target: img; property: "smooth"; value: "false" } + } + //![standalone] + } } - |