-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtrain25.qml
63 lines (54 loc) · 1.22 KB
/
train25.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
import QtQuick 2.15
Rectangle {
width: 800
height: 800
Rectangle {
id: ayRect
x: 100
y: 100
width: parent.width - 200
height: 60
color: "white"
border.color: "black"
TextInput {
id: ayText
text: "This is our app title"
font.family: "cmu concrete"
font.pixelSize: 30
color: "black"
anchors.centerIn: parent
}
}
Rectangle {
width: 200
height: 50
color: "red"
anchors.left: ayRect.left
anchors.top: ayRect.bottom
anchors.topMargin: 20
Text {
text: qsTr("Red")
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onPressed: ayText.color = "red"
}
}
Rectangle {
width: 200
height: 50
color: "green"
anchors.right: ayRect.right
anchors.top: ayRect.bottom
anchors.topMargin: 20
Text {
text: qsTr("Green")
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: ayText.color = "green"
}
}
}