From 09c1a44150f4a736932d78b9ebdc87a50fee461a Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Wed, 24 May 2023 09:58:58 +0200 Subject: [PATCH] Adding escape shortcut for base dialog. --- .../qml/eu/ad5001/LogarithmPlotter/Popup/BaseDialog.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/BaseDialog.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/BaseDialog.qml index 05de55c..be69067 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/BaseDialog.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/Popup/BaseDialog.qml @@ -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() }