summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-02-12 14:21:44 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-02-12 14:21:44 +0100
commita20948b726c1e0edd70761e8e115a53ba5526a51 (patch)
treecdcf3367f67c465f005a97dec6141e5a4e024781 /examples
parent3434a0d5f8cb4bb5008caec3772c4e398986196f (diff)
parent1c54d411ad6e98c3779a412750aec8b93d587872 (diff)
downloadqtquickcontrols-a20948b726c1e0edd70761e8e115a53ba5526a51.tar.gz
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/layouts/qquicklinearlayout.cpp Change-Id: Ib24dab43c37fc0f3f6a85398766f102a1ac833c3
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/controls/touch/main.qml16
1 files changed, 6 insertions, 10 deletions
diff --git a/examples/quick/controls/touch/main.qml b/examples/quick/controls/touch/main.qml
index ab5d534f..163ec937 100644
--- a/examples/quick/controls/touch/main.qml
+++ b/examples/quick/controls/touch/main.qml
@@ -52,16 +52,6 @@ ApplicationWindow {
anchors.fill: parent
}
- // Implements back key navigation
- Keys.onReleased: {
- if (event.key === Qt.Key_Back) {
- if (stackView.depth > 1) {
- stackView.pop();
- event.accepted = true;
- } else { Qt.quit(); }
- }
- }
-
toolBar: BorderImage {
border.bottom: 8
source: "images/toolbar.png"
@@ -133,6 +123,12 @@ ApplicationWindow {
StackView {
id: stackView
anchors.fill: parent
+ // Implements back key navigation
+ focus: true
+ Keys.onReleased: if (event.key === Qt.Key_Back && stackView.depth > 1) {
+ stackView.pop();
+ event.accepted = true;
+ }
initialItem: Item {
width: parent.width