-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.qml
40 lines (34 loc) · 769 Bytes
/
main.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
import QtQuick 2.6
Item {
id: root
visible: true
width: 128
height: 64
Rectangle {
property bool isRight: false
id: indicator
anchors.bottom: parent.bottom
anchors.bottomMargin: 5
x: (isRight ? 5 : (root.width - width) - 5)
width: 15
height: width
radius: width / 2
color: "black"
Behavior on x {
PropertyAnimation {
duration: 500
}
}
Timer {
id: moveTimer
running: true
repeat: true
interval: 500
onTriggered: indicator.isRight = !indicator.isRight
}
}
Text {
anchors.centerIn: parent
text: "Hello World!"
}
}