added escape key handler (#461)
Added escape key handler for drawer2type
This commit is contained in:
parent
6dbdb85aaf
commit
b05ad2392b
7 changed files with 90 additions and 8 deletions
|
@ -13,6 +13,8 @@ import "../Components"
|
|||
PageType {
|
||||
id: root
|
||||
|
||||
property bool isControlsDisabled: false
|
||||
|
||||
Connections {
|
||||
target: PageController
|
||||
|
||||
|
@ -45,6 +47,18 @@ PageType {
|
|||
stackView.pop()
|
||||
}
|
||||
}
|
||||
|
||||
function onDisableControls(disabled) {
|
||||
isControlsDisabled = disabled
|
||||
}
|
||||
|
||||
function onEscapePressed() {
|
||||
if (isControlsDisabled || busyIndicator.visible) {
|
||||
return
|
||||
}
|
||||
|
||||
PageController.closePage()
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue