-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.qml
79 lines (69 loc) · 1.7 KB
/
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
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
import QtQuick 2.0
import QtQuick.Layouts 1.2 // for RowLayout and ColumnLayout
import QtQuick.Controls 1.4 // for the Button
Rectangle {
id: gameView
width: 400
height: 400
border.color: "black"
gradient: Gradient {
GradientStop {
position: 0.00;
color: "#6baaf1";
}
GradientStop {
position: 0.64;
color: "#ffffff";
}
GradientStop {
position: 0.98;
color: "#175800";
}
}
ExclusiveGroup {
Action {
id: actionOne
objectName: "actionOne"
checkable: true
text: "Go 1"
onTriggered: theOne.trigger()
onCheckedChanged: {
if (checked === true)
bigText.text = text;
}
}
Action {
id: actionTwo
objectName: "actionTwo"
checkable: true
text: "Go 2"
onTriggered: theTwo.trigger()
onCheckedChanged: {
if (checked === true)
bigText.text = text;
}
}
}
ColumnLayout {
anchors.fill: parent
Text {
Layout.fillWidth: true
Layout.alignment: Qt.AlignTop | Qt.AlignLeft
Layout.preferredHeight: width * 0.5
id: bigText
text: "none"
font.bold: true
font.pointSize: 140
fontSizeMode: Text.Fit
minimumPointSize: 8
}
Row {
Button {
action: actionOne
}
Button {
action: actionTwo
}
}
}
}