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>
This commit is contained in:
J-P Nurmi 2017-04-06 09:45:46 +02:00
parent d453cc9ec7
commit 1414f2fcce
1 changed files with 2 additions and 2 deletions

View File

@ -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()