diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-09-03 19:58:21 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-09-09 15:10:36 +0000 |
commit | aafed07dee5fd2d22518e49c4fa7798735e9e681 (patch) | |
tree | e967c1ce0508c0d7f374a005234d30d238a31e8e /src/widgets | |
parent | 3a9b5162e6983c1fe825e50988f953895a3a9838 (diff) |
macOS: Don't show QMessageBox::about(Qt) as modal windows
The system behavior is to not show these kinds of dialogs as modal,
and we've documented that for QMessageBox.
However, calling show() instead of exec() is not enough, as the
default constructor of QMessageBox will set the modality of the
widget to application-modal. We need to explicitly override this.
[ChangLog][macOS] QMessageBox::about(Qt) now shows dialog non-modal,
as documented.
Pick-to: 6.2
Change-Id: I6bb59efb81feb23122276a9eede71b2f20c9d7c6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 7b6148b1d2..ac2f8bd2d5 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -1830,6 +1830,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te #else msgBox->d_func()->buttonBox->setCenterButtons(true); #endif + msgBox->setModal(false); msgBox->show(); #else msgBox->exec(); @@ -1915,6 +1916,7 @@ void QMessageBox::aboutQt(QWidget *parent, const QString &title) #else msgBox->d_func()->buttonBox->setCenterButtons(true); #endif + msgBox->setModal(false); msgBox->show(); #else msgBox->exec(); |