diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-31 13:09:24 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-31 13:09:24 (GMT) |
commit | 0373325dd1390682922dd07614214c453d473ce3 (patch) | |
tree | 93267c9f7d2bdd9e387dc5cda34cd6c548cf8e5c /doc/src | |
parent | b85a41ece042bca5c4e1ac2a6549f2cdc2c6ca1a (diff) | |
parent | d401f416478628ce84afd2cd755f8df91edee22d (diff) | |
download | Qt-0373325dd1390682922dd07614214c453d473ce3.zip Qt-0373325dd1390682922dd07614214c453d473ce3.tar.gz Qt-0373325dd1390682922dd07614214c453d473ce3.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (21 commits)
Fix bug when adding import paths manually
Update Comment
Optimize QDeclarativeEngine::importExtension
QGraphicsEffect : Don't rely on the exposedArea when rendering the item into the cache.
Fix snapping in listview.
Minor cleanup.
Improve flipable example.
Minor cleanup for visual test framework.
VisibleArea is not a creatable type.
More testing.
Test openUrlExternally
doc
example of WebView onAlert, and of popups in general.
Update examples/declarative.pro
Update mouseX(Y) when clicking on a mouse area
Declarative examples cleanup.
Add test.
doc
Move gitignore to right level, update for Linux.
Cleanup MouseArea visual tests.
...
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/snippets/declarative/flipable.qml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/src/snippets/declarative/flipable.qml b/doc/src/snippets/declarative/flipable.qml new file mode 100644 index 0000000..c837ebc --- /dev/null +++ b/doc/src/snippets/declarative/flipable.qml @@ -0,0 +1,37 @@ +//! [0] +import Qt 4.6 + +Flipable { + id: flipable + width: 240 + height: 240 + + property int angle: 0 + property bool flipped: false + + front: Image { source: "front.png" } + back: Image { source: "back.png" } + + 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 + } + + states: State { + name: "back" + PropertyChanges { target: flipable; angle: 180 } + when: flipable.flipped + } + + transitions: Transition { + NumberAnimation { properties: "angle"; duration: 1000 } + } + + MouseArea { + anchors.fill: parent + onClicked: flipable.flipped = !flipable.flipped + } +} +//! [0] + |