blob: 90c094fff3735883387880cd1c41b54ed7ac5f5b (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
import QtQuick 2.0
Item {
id: root
anchors.fill: parent
Rectangle {
width: 100
height: 100
color: "steelblue"
radius: 15
x: 100
y: 50
Rectangle {
anchors.verticalCenter: parent.verticalCenter;
height: 3
anchors.left: parent.left
anchors.right: parent.right;
anchors.margins: 10
color: "black"
}
Rectangle {
anchors.horizontalCenter: parent.horizontalCenter;
width: 3
anchors.top: parent.top
anchors.bottom: parent.bottom;
anchors.margins: 10
color: "black"
}
Rectangle {
anchors.verticalCenter: parent.verticalCenter;
height: 1
anchors.left: parent.left
anchors.right: parent.right;
anchors.margins: 11
color: "white"
}
Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.margins: 11
width: 1
color: "white";
}
SequentialAnimation on x {
NumberAnimation { to: root.width - 100; duration: 15000 }
NumberAnimation { to: 0; duration: 15000 }
loops: Animation.Infinite
}
SequentialAnimation on y {
NumberAnimation { to: root.height - 100; duration: 20070 }
NumberAnimation { to: 0; duration: 20070 }
loops: Animation.Infinite
}
NumberAnimation on rotation {
loops: Animation.Infinite
duration: 60000
from: 0
to: -360
}
}
}
|