aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-04-06 09:45:46 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-04-06 13:43:56 +0000
commit1414f2fcce6bcd3f02c571a371d999aff8814a74 (patch)
tree8f887159c10a89f44d89d875fc77212c13f22993 /examples/quickcontrols2
parentd453cc9ec7efd23479368a9b08cc3d3f0753b57a (diff)
Gallery: handle Back shortcut on mobile
Menus, dialogs, and drawers already handle it out of the box, but for page/stack navigation we need an explicit shortcut. Change-Id: Iad3e05f0fc31dbd66e3b1aa9286f8ef076fcff0d Task-number: QTBUG-58105 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quickcontrols2')
-rw-r--r--examples/quickcontrols2/gallery/gallery.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml
index ed5171df..c077f6c5 100644
--- a/examples/quickcontrols2/gallery/gallery.qml
+++ b/examples/quickcontrols2/gallery/gallery.qml
@@ -48,7 +48,7 @@
**
****************************************************************************/
-import QtQuick 2.6
+import QtQuick 2.9
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.1
@@ -68,7 +68,7 @@ ApplicationWindow {
}
Shortcut {
- sequence: "Esc"
+ sequences: ["Esc", "Back"]
enabled: stackView.depth > 1
onActivated: {
stackView.pop()