-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
59 lines (50 loc) · 1.28 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
import QtQuick 2.0
import QtQuick.Controls 2.0
ApplicationWindow {
id: window
visible: true
width: 740
height: 730
title: qsTr("Stack")
header: ToolBar {
contentHeight: toolButton.implicitHeight
ToolButton {
id: toolButton
text: stackView.depth > 1 ? "\u25C0" : "\u2630"
font.pixelSize: Qt.application.font.pixelSize * 1.6
onClicked: {
if (stackView.depth > 1) {
stackView.push("MainMenu.qml");
}
}
}
Label {
text: stackView.currentItem.title
anchors.centerIn: parent
}
}
StackView {
transform: [
Rotation {
id: sceneRotation
axis.x: 1
axis.y: 0
axis.z: 0
origin.x: width / 2
origin.y: height / 2
angle: 15
},
Translate {
id: sceneTranslation
x: 0
y: 0
}
]
id: stackView
initialItem: "MainMenu.qml"
anchors.fill: parent
onCurrentItemChanged: {
stackView.currentItem.requestStackChange.connect(stackView.push);
}
}
}