summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatasof Wirapraja <anatasof.wirapraja@gmail.com>2019-09-18 17:25:13 +0700
committerAnatasof Wirapraja <anatasof.wirapraja@gmail.com>2019-09-18 17:25:13 +0700
commit71d7a95e4a220dd211e49a08c847cebe2857bd81 (patch)
treec1b62fcb367b7bd77c07095712b409758a9e5cc9
parent3b42ee7118b34996e7205154816b790e11bb15cb (diff)
remove `header` on `main.qml`
-rw-r--r--main.qml86
1 files changed, 25 insertions, 61 deletions
diff --git a/main.qml b/main.qml
index b4632e1..b0bb8a9 100644
--- a/main.qml
+++ b/main.qml
@@ -12,76 +12,40 @@ ApplicationWindow {
title: {
text: qsTr("kelakon")
}
- header:
- ToolBar {
- background: Rectangle {
- color: "#FAFFFFFF"
- }
- RowLayout {
- ToolButton {
- id: toolButton
- icon.name: "menu-button"
- icon.source: "components/icons/menu-24px.svg"
- highlighted: true
- onClicked: {
- if (contentView.depth > 1) {
- contentView.pop()
- } else {
- drawer.open()
- }
- }
- }
- Label {
- text: contentView.currentItem.title
- font.family: "Work Sans"
- font.weight: Font.Medium
- font.pointSize: 20
- wrapMode: Text.WordWrap
- elide: Label.ElideRight
- horizontalAlignment: Qt.AlignHCenter
- verticalAlignment: Qt.AlignVCenter
- }
- }
- }
+ StackView {
+ id: pageView
+ anchors.fill: parent
+ initialItem: Onboarding {}
- Drawer {
- id: drawer
- width: window.width * 0.8
- height: window.height
- visible: false
+ Drawer {
+ id: drawer
+ width: window.width * 0.8
+ height: window.height
+ visible: false
- Column {
- anchors.fill: parent
+ Column {
+ anchors.fill: parent
- ItemDelegate {
- text: qsTr("Page 1")
- width: parent.width
- onClicked: {
- contentView.push("Page1Form.ui.qml")
- drawer.close()
+ ItemDelegate {
+ text: qsTr("Page 1")
+ width: parent.width
+ onClicked: {
+ pageView.push("Page1Form.ui.qml")
+ drawer.close()
+ }
}
- }
- ItemDelegate {
- text: qsTr("Page 2")
- width: parent.width
- onClicked: {
- contentView.push("Page2Form.ui.qml")
- drawer.close()
+ ItemDelegate {
+ text: qsTr("Page 2")
+ width: parent.width
+ onClicked: {
+ pageView.push("Page2Form.ui.qml")
+ drawer.close()
+ }
}
}
}
}
- StackView {
- id: contentView
- initialItem: Onboarding {
-
- }
-
- anchors.fill: parent
-
-
- }
}