Adding escape shortcut for base dialog.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
40743e54c3
commit
09c1a44150
1 changed files with 6 additions and 1 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue