QMessageBox: don't use a native dialog if a style sheet is active
With 6.5 we try to use the native message dialog if we can, but we didn't account for the style sheet. This restores pre-6.5 behavior for QMessageBox. Other dialogs will continue to be native, even if a style sheet is in use. While this is inconsistent, the other dialogs are substantially more functional, so switching to the Qt version because of a style sheet being active would be a significant change of behavior. Pick-to: 6.7 6.6 6.5 Fixes: QTBUG-120054 Change-Id: I07eae609bc360140e096c5eb7ad004ffa4422123 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
f894f04c9d
commit
1b71e2d894
@ -2810,6 +2810,7 @@ bool QMessageBoxPrivate::canBeNativeDialog() const
|
||||
return true;
|
||||
if (QCoreApplication::testAttribute(Qt::AA_DontUseNativeDialogs)
|
||||
|| q->testAttribute(Qt::WA_DontShowOnScreen)
|
||||
|| q->testAttribute(Qt::WA_StyleSheet)
|
||||
|| (options->options() & QMessageDialogOptions::Option::DontUseNativeDialog)) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user