summaryrefslogtreecommitdiffstats
path: root/tests/animated-circle.qml
blob: af2571c8323d70d094aa642f9053003ad0e44eef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import QtQuick 1.0

Item 
{
    width: 800
    height: 600

    Rectangle {
        width: 100
        height: 100
        radius: 50
        color: "black"

        property real t;

        x: parent.width / 2 + parent.width / 3 * Math.sin(t * Math.PI * 2) - width / 2.;
        y: parent.height / 2 + parent.height / 3 * Math.cos(t * Math.PI * 2) - height / 2.;

	NumberAnimation on t { from: 0; to: 1; duration: 5000; loops: Animation.Infinite }
    }
}