qml: pressing "Esc" on desktop to ~simulate "back" button

This commit is contained in:
SomberNight
2023-03-21 16:51:50 +00:00
parent 98304662ca
commit 7f7ee8d82f
3 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ ElDialog {
focus: true
closePolicy: canCancel ? Popup.CloseOnEscape | Popup.CloseOnPressOutside : Popup.NoAutoClose
closePolicy: canCancel ? Popup.CloseOnPressOutside : Popup.NoAutoClose
property bool canCancel: true
@@ -19,7 +19,7 @@ Dialog {
}
closePolicy: allowClose
? Popup.CloseOnEscape | Popup.CloseOnPressOutside
? Popup.CloseOnPressOutside
: Popup.NoAutoClose
onOpenedChanged: {
+8
View File
@@ -430,6 +430,14 @@ ApplicationWindow
}
}
Shortcut {
context: Qt.ApplicationShortcut
sequence: "Esc"
onActivated: {
close()
}
}
Connections {
target: Daemon
function onWalletRequiresPassword(name, path) {