summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstylesheetstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 2b9f042862..260a660bf9 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -77,7 +77,9 @@
#include <qmainwindow.h>
#include <qdockwidget.h>
#include <qmdisubwindow.h>
+#if QT_CONFIG(dialog)
#include <qdialog.h>
+#endif
#include <private/qwidget_p.h>
#include <QAbstractSpinBox>
#if QT_CONFIG(label)
@@ -2820,7 +2822,10 @@ void QStyleSheetStyle::polish(QWidget *w)
#ifndef QT_NO_MENUBAR
|| qobject_cast<QMenuBar *>(w)
#endif
- || qobject_cast<QDialog *>(w)) {
+#if QT_CONFIG(dialog)
+ || qobject_cast<QDialog *>(w)
+#endif
+ ) {
w->setAttribute(Qt::WA_StyledBackground, true);
}
QWidget *ew = embeddedWidget(w);