Adding escape shortcut for base dialog.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adsooi 2023-05-24 09:58:58 +02:00
parent 40743e54c3
commit 09c1a44150
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160

View file

@ -28,6 +28,7 @@ import QtQuick.Controls
*/
Window {
id: base
color: sysPalette.window
visible: false;
flags: Qt.Dialog | Qt.Popup | Qt.MSWindowsFixedSizeDialogHint
@ -35,7 +36,6 @@ Window {
minimumWidth: width
maximumWidth: width
height: minimumHeight
// maximumHeight: contentItem.implicitHeight + 2*margin
property int margin: 10
Button {
@ -48,6 +48,11 @@ Window {
onClicked: close()
}
Shortcut {
sequence: "Esc"
onActivated: base.close()
}
function open() {
show()
}