diff options
author | Alexandra Betouni <ABetouni@luxoft.com> | 2018-11-20 12:49:37 +0100 |
---|---|---|
committer | Antti Hölttä <AHoelttae@luxoft.com> | 2019-03-18 16:32:22 +0100 |
commit | d87734d37a0c9689647b4eaaef1eeda318c3f8be (patch) | |
tree | 59e61cc9e9ddbf888bd0ab5964185cace219eb6a /DemoApplication/main.qml | |
parent | 4e53c46500bdbe9f6fd7228f14b27fb7262b0350 (diff) |
Demo application clean up
Minor improvements in pro file for demo app
Also update .gitignore to ignore DS_Store files
Removed unecessary code and files
Diffstat (limited to 'DemoApplication/main.qml')
-rw-r--r-- | DemoApplication/main.qml | 81 |
1 files changed, 23 insertions, 58 deletions
diff --git a/DemoApplication/main.qml b/DemoApplication/main.qml index b408923..b0e54cb 100644 --- a/DemoApplication/main.qml +++ b/DemoApplication/main.qml @@ -1,74 +1,39 @@ import QtQuick 2.9 import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.3 + import CursorNavigation 1.0 +import "pages" ApplicationWindow { id: window - visible: true width: 800 height: 600 - 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.pop() - } else { - drawer.open() - } - } + visible: true + title: qsTr("Cursor Navigation Demo Application") + + header: TabBar { + id: tabBar + width: parent.width + TabButton { + CursorNavigation.acceptsCursor: true + text: qsTr("Page 1") } - - Label { - text: stackView.currentItem.title - anchors.centerIn: parent + TabButton { + CursorNavigation.acceptsCursor: true + text: qsTr("Page 2") } - } - - 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.qml") - drawer.close() - } - } - ItemDelegate { - text: qsTr("Page 2") - width: parent.width - onClicked: { - stackView.push("Page2Form.qml") - drawer.close() - } - } - ItemDelegate { - text: qsTr("Page 3") - width: parent.width - onClicked: { - stackView.push("Page3Form.qml") - drawer.close() - } - } + TabButton { + CursorNavigation.acceptsCursor: true + text: qsTr("Page 3") } } - StackView { - id: stackView - initialItem: "HomeForm.qml" + contentData: StackLayout { anchors.fill: parent + currentIndex: tabBar.currentIndex + Page1 { } + Page2 { } + Page3 { } } } |