summaryrefslogtreecommitdiffstats
path: root/examples/declarative/webview/content/SpinSquare.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/webview/content/SpinSquare.qml')
-rw-r--r--examples/declarative/webview/content/SpinSquare.qml26
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/declarative/webview/content/SpinSquare.qml b/examples/declarative/webview/content/SpinSquare.qml
new file mode 100644
index 0000000..5ccdeb6
--- /dev/null
+++ b/examples/declarative/webview/content/SpinSquare.qml
@@ -0,0 +1,26 @@
+import Qt 4.6
+
+Item {
+ property var period : 250
+ property var color : "black"
+ id: root
+
+ Item {
+ x: root.width/2
+ y: root.height/2
+ Rectangle {
+ color: root.color
+ x: -width/2
+ y: -height/2
+ width: root.width
+ height: width
+ }
+ rotation: NumberAnimation {
+ from: 0
+ to: 360
+ repeat: true
+ running: true
+ duration: root.period
+ }
+ }
+}