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.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index efd9d4c1d7..8f88af05e0 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -85,7 +85,9 @@
#include <qtabbar.h>
#endif
#include <QMetaProperty>
+#if QT_CONFIG(mainwindow)
#include <qmainwindow.h>
+#endif
#if QT_CONFIG(dockwidget)
#include <qdockwidget.h>
#endif
@@ -2825,7 +2827,7 @@ void QStyleSheetStyle::polish(QWidget *w)
#ifndef QT_NO_FRAME
|| qobject_cast<QFrame *>(w)
#endif
-#ifndef QT_NO_MAINWINDOW
+#if QT_CONFIG(mainwindow)
|| qobject_cast<QMainWindow *>(w)
#endif
#ifndef QT_NO_MDIAREA