summaryrefslogtreecommitdiffstats
path: root/examples/declarative/webview/content/SpinSquare.qml
blob: 5c14506da029fe27480097270196ff31dc10a386 (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
26
27
28
29
Item {
    id: Root
    properties: Property {
        name: "period"
        value: 250
    }
    properties: Property {
        name: "color"
        value: "black"
    }
    Item {
        x: Root.width/2
        y: Root.height/2
        Rect {
            color: Root.color
            x: -width/2
            y: -height/2
            width: Root.width
            height: width
        }
        rotation: NumericAnimation {
            from: 0
            to: 360
            repeat: true
            running: true
            duration: Root.period
        }
    }
}