summaryrefslogtreecommitdiffstats
path: root/examples/declarative/webview/content/SpinSquare.qml
blob: ccd68dfe7ed7b543ba84bada6b09d473893e5ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import Qt 4.7

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
        }
        NumberAnimation on rotation {
            from: 0
            to: 360
            loops: Animation.Infinite
            duration: root.period
        }
    }
}