summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/qml-intro/number-animation2.qml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/declarative/qml-intro/number-animation2.qml')
-rw-r--r--doc/src/snippets/declarative/qml-intro/number-animation2.qml24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/src/snippets/declarative/qml-intro/number-animation2.qml b/doc/src/snippets/declarative/qml-intro/number-animation2.qml
new file mode 100644
index 0000000..beb3114
--- /dev/null
+++ b/doc/src/snippets/declarative/qml-intro/number-animation2.qml
@@ -0,0 +1,24 @@
+import Qt 4.7
+
+Rectangle {
+ id: mainRec
+ width: 600
+ height: 400
+
+ Image {
+ id: image1
+ source: "images/qt-logo.png"
+ x: 200; y: 100
+ width: 100; height: 100
+
+ // Animate a rotation
+ transform: Rotation {
+ origin.x: 50; origin.y: 50; axis {x:0; y:1; z:0} angle:0
+ NumberAnimation on angle {
+ from: 0; to: 360;
+ duration: 3000;
+ loops: Animation.Infinite
+ }
+ }
+ }
+}