summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-10-25 09:51:51 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-10-25 09:51:51 (GMT)
commitf8c9314d6224948c28487e291b4cdad0049682c7 (patch)
treecf4b824cad0229f503d3cf98334d88c9d727d858 /doc
parent928387618011af72e0011287e1002a9b51a6e51f (diff)
parent875fc441887e7592afe1c2c1df9ffd1b889b4eca (diff)
downloadQt-f8c9314d6224948c28487e291b4cdad0049682c7.zip
Qt-f8c9314d6224948c28487e291b4cdad0049682c7.tar.gz
Qt-f8c9314d6224948c28487e291b4cdad0049682c7.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Diffstat (limited to 'doc')
-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 {