summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@qt.io>2022-06-15 22:19:08 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-20 13:30:34 +0000
commit09a48296104d3452e55d20d748269023bfdb33ec (patch)
tree5aab4dd5a74d9f50d6f49bc2a41ee1045597ab5f
parent46e5c81a100b6bbd0eff2d906619e03f6f5c5ce6 (diff)
Do not use the native dialog to show the color picker on macOS
With the native dialog, there were either problems with the modality when using it asynchronously or with the life cycle when using it synchronously. Not using the native dialog avoids these problems. Task-number: QTBUG-102099 Change-Id: Icb9a9afda48c47558b8e8ecb6d89adc0961d5063 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 51b024c53ceb43febbded3c14974e9d8f75c1c11) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
-rw-r--r--src/webenginewidgets/api/qwebengineview.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp
index 6a22a887e..0ed67edab 100644
--- a/src/webenginewidgets/api/qwebengineview.cpp
+++ b/src/webenginewidgets/api/qwebengineview.cpp
@@ -267,6 +267,10 @@ void QWebEngineViewPrivate::showColorDialog(
QColorDialog::connect(dialog, SIGNAL(colorSelected(QColor)), dialog, SLOT(deleteLater()));
QColorDialog::connect(dialog, SIGNAL(rejected()), dialog, SLOT(deleteLater()));
+#if defined(Q_OS_MACOS)
+ dialog->setOption(QColorDialog::DontUseNativeDialog);
+#endif
+
dialog->open();
#else
Q_UNUSED(controller);