1
0

qml: include dialogs in back button navigation

This commit is contained in:
Sander van Grieken
2022-07-26 16:20:17 +02:00
parent 725c70bc4a
commit 3b9c009e43
13 changed files with 42 additions and 11 deletions

View File

@@ -27,6 +27,8 @@ ApplicationWindow
property alias stack: mainStackView
property Dialog activeDialog: null
header: ToolBar {
id: toolbar
@@ -205,6 +207,14 @@ ApplicationWindow
}
onClosing: {
if (activeDialog) {
console.log('dialog on top')
if (activeDialog.allowClose) {
activeDialog.close()
}
close.accepted = false
return
}
if (stack.depth > 1) {
close.accepted = false
stack.pop()