aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/wearable/wearable.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-03-13 09:20:04 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-03-13 09:31:51 +0000
commit97b282732a23a8e088b90a3650dd7e81ae99649d (patch)
tree2b4bf34941b508592cc6647dc690966ad25c666e /examples/quickcontrols2/wearable/wearable.qml
parent77cbcb964185cbcfeb67b1dad6475507420f1093 (diff)
Wearable: merge MainContainer.qml into wearable.qml
Utilize the header-content-footer layout of AppWindow. Change-Id: I50a53fd5c372161af738e5d53085c669cf2614b8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quickcontrols2/wearable/wearable.qml')
-rw-r--r--examples/quickcontrols2/wearable/wearable.qml31
1 files changed, 28 insertions, 3 deletions
diff --git a/examples/quickcontrols2/wearable/wearable.qml b/examples/quickcontrols2/wearable/wearable.qml
index 8d596665ee..15c75494e4 100644
--- a/examples/quickcontrols2/wearable/wearable.qml
+++ b/examples/quickcontrols2/wearable/wearable.qml
@@ -49,11 +49,11 @@
****************************************************************************/
import QtQuick 2.7
-import QtQuick.Controls 2.0
+import QtQuick.Controls 2.0 as QQC2
import "qml"
import "qml/Style"
-ApplicationWindow {
+QQC2.ApplicationWindow {
id: window
visible: true
@@ -67,7 +67,32 @@ ApplicationWindow {
source: "images/background/HomeBackground.png"
}
- MainContainer {
+ header: NaviButton {
+ id: homeButton
+
+ edge: Qt.TopEdge
+ enabled: stackView.depth > 1
+ imageSource: "images/home.png"
+
+ onClicked: stackView.pop(null)
+ }
+
+ footer: NaviButton {
+ id: backButton
+
+ edge: Qt.BottomEdge
+ enabled: stackView.depth > 1
+ imageSource: "images/back.png"
+
+ onClicked: stackView.pop()
+ }
+
+ QQC2.StackView {
+ id: stackView
+
+ focus: true
anchors.fill: parent
+
+ initialItem: LauncherMain { }
}
}