summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorA-Team <ateam@pad.test.qt.nokia.com>2010-10-22 22:00:11 (GMT)
committerA-Team <ateam@pad.test.qt.nokia.com>2010-10-22 22:00:11 (GMT)
commit0787890a9a06a0f05c78c7e4d85655fdc1fc9398 (patch)
tree824906aa3899243d46e2590a86ccd114259712a5 /doc/src
parent215f46d0a61a2f48d1ccbbc52c3b161fa36c84ec (diff)
parentdb14623485396fd69839e519184b794775b65b01 (diff)
downloadQt-0787890a9a06a0f05c78c7e4d85655fdc1fc9398.zip
Qt-0787890a9a06a0f05c78c7e4d85655fdc1fc9398.tar.gz
Qt-0787890a9a06a0f05c78c7e4d85655fdc1fc9398.tar.bz2
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/snippets/declarative/flipable/flipable.qml17
1 files changed, 9 insertions, 8 deletions
diff --git a/doc/src/snippets/declarative/flipable/flipable.qml b/doc/src/snippets/declarative/flipable/flipable.qml
index cd5da4b..8d48bd9 100644
--- a/doc/src/snippets/declarative/flipable/flipable.qml
+++ b/doc/src/snippets/declarative/flipable/flipable.qml
@@ -46,26 +46,27 @@ Flipable {
width: 240
height: 240
- property int angle: 0
property bool flipped: false
- front: Image { source: "front.png" }
- back: Image { source: "back.png" }
+ front: Image { source: "front.png"; anchors.centerIn: parent }
+ back: Image { source: "back.png"; anchors.centerIn: parent }
transform: Rotation {
- origin.x: flipable.width/2; origin.y: flipable.height/2
- axis.x: 0; axis.y: 1; axis.z: 0 // rotate around y-axis
- angle: flipable.angle
+ id: rotation
+ origin.x: flipable.width/2
+ origin.y: flipable.height/2
+ axis.x: 0; axis.y: 1; axis.z: 0 // set axis.y to 1 to rotate around y-axis
+ angle: 0 // the default angle
}
states: State {
name: "back"
- PropertyChanges { target: flipable; angle: 180 }
+ PropertyChanges { target: rotation; angle: 180 }
when: flipable.flipped
}
transitions: Transition {
- NumberAnimation { properties: "angle"; duration: 1000 }
+ NumberAnimation { target: rotation; property: "angle"; duration: 4000 }
}
MouseArea {