diff --git a/src/plugins/styles/modernwindows/qwindows11style.cpp b/src/plugins/styles/modernwindows/qwindows11style.cpp index d7548b6517f..bf015c53aee 100644 --- a/src/plugins/styles/modernwindows/qwindows11style.cpp +++ b/src/plugins/styles/modernwindows/qwindows11style.cpp @@ -765,6 +765,21 @@ void QWindows11Style::drawPrimitive(PrimitiveElement element, const QStyleOption } } break; + case QStyle::PE_Widget: { +#if QT_CONFIG(dialogbuttonbox) + const QDialogButtonBox *buttonBox = nullptr; + if (qobject_cast (widget)) + buttonBox = widget->findChild(QLatin1String("qt_msgbox_buttonbox")); +#if QT_CONFIG(inputdialog) + else if (qobject_cast (widget)) + buttonBox = widget->findChild(QLatin1String("qt_inputdlg_buttonbox")); +#endif // QT_CONFIG(inputdialog) + if (buttonBox) { + painter->fillRect(option->rect,option->palette.window()); + } +#endif + break; + } default: QWindowsVistaStyle::drawPrimitive(element, option, painter, widget); }