-
Notifications
You must be signed in to change notification settings - Fork 1
/
hello2.qml
103 lines (90 loc) · 1.63 KB
/
hello2.qml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import QtQuick 2.0
Rectangle
{
id: main
width: 1280
height: 720
color: "white"
Text
{
id: finish
text: "You see, it's really easy to do fancy animations using Qt5 and it has the bonus of being super smooth :-)"
font.pointSize: 36
wrapMode: Text.WordWrap
y: parent.height
x: 400
width: parent.width - 400
}
Text {
id: hello
text: "Hello, world"
font.family: "Helvetica"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pointSize: 48
//font.letterSpacing: 40
color: "black"
//width: parent.width
x: (parent.width / 2) - (hello.width / 2)
y: (parent.height / 2) - (hello.height / 2)
SequentialAnimation
{
running: true
NumberAnimation
{
target: hello
property: "opacity"
from: 0.0
to: 1.0
duration: 5000
}
NumberAnimation
{
target: hello
property: "scale"
from: 1.0
to: 3.5
duration: 2000
}
ParallelAnimation
{
RotationAnimation
{
target: hello
direction: RotationAnimation.Counterclockwise
from: 0
to: 270
duration: 2000
}
NumberAnimation
{
target: hello
property: "scale"
from: 3.5
to: 2.0
duration: 2000
}
NumberAnimation
{
target: hello
property: "x"
to: 20
duration: 2000
}
ColorAnimation
{
target: hello
to: "#FF0000"
duration: 2000
}
}
NumberAnimation
{
target: finish
property: "y"
to: 0
duration: 5000
}
}
}
}