diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 9f1a92145c3..46a6e871b14 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -2720,7 +2720,8 @@ bool QMessageBoxPrivate::canBeNativeDialog() const if (nativeDialogInUse) return true; if (QCoreApplication::testAttribute(Qt::AA_DontUseNativeDialogs) - || q->testAttribute(Qt::WA_DontShowOnScreen)) { + || q->testAttribute(Qt::WA_DontShowOnScreen) + || q->testAttribute(Qt::WA_StyleSheet)) { return false; }