WIP Quick GUI work

This commit is contained in:
Cameron Gutman
2018-07-04 16:40:21 -07:00
parent 6a3b95a4b1
commit 3a7d3c807e
12 changed files with 223 additions and 60 deletions
+2 -53
View File
@@ -7,59 +7,8 @@ ApplicationWindow {
width: 640
height: 480
title: qsTr("Stack")
color: "#333333"
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.pop()
} else {
drawer.open()
}
}
}
Label {
text: stackView.currentItem.title
anchors.centerIn: parent
}
}
Drawer {
id: drawer
width: window.width * 0.66
height: window.height
Column {
anchors.fill: parent
ItemDelegate {
text: qsTr("Page 1")
width: parent.width
onClicked: {
stackView.push("Page1Form.ui.qml")
drawer.close()
}
}
ItemDelegate {
text: qsTr("Page 2")
width: parent.width
onClicked: {
stackView.push("Page2Form.ui.qml")
drawer.close()
}
}
}
}
StackView {
id: stackView
initialItem: "HomeForm.ui.qml"
anchors.fill: parent
PcView {
}
}