Core: Close ICore::showWarningWithOptions dialog on pressing Esc button

Change-Id: Ic09202799bde9cb4fbc3ca4e9836ca0c0cc499f2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Sergey Levin
2022-07-11 12:42:45 +03:00
parent ab90298fde
commit 4a1a0eaa39

View File

@@ -345,6 +345,7 @@ bool ICore::showWarningWithOptions(const QString &title, const QString &text,
parent = m_mainwindow;
QMessageBox msgBox(QMessageBox::Warning, title, text,
QMessageBox::Ok, parent);
msgBox.setEscapeButton(QMessageBox::Ok);
if (!details.isEmpty())
msgBox.setDetailedText(details);
QAbstractButton *settingsButton = nullptr;