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:
parent
d453cc9ec7
commit
1414f2fcce
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue