summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles')
-rw-r--r--src/widgets/styles/qcommonstyle.cpp6
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp4
2 files changed, 10 insertions, 0 deletions
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 24070f18a6..b54f49c8fc 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -49,7 +49,11 @@
#include <qdockwidget.h>
#include <qdrawutil.h>
#include <qdialogbuttonbox.h>
+#if QT_CONFIG(formlayout)
#include <qformlayout.h>
+#else
+#include <qlayout.h>
+#endif
#include <qgroupbox.h>
#include <qmath.h>
#include <qmenu.h>
@@ -5162,12 +5166,14 @@ int QCommonStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget
ret = QWizard::ClassicStyle;
break;
#endif
+#if QT_CONFIG(formlayout)
case SH_FormLayoutWrapPolicy:
ret = QFormLayout::DontWrapRows;
break;
case SH_FormLayoutFieldGrowthPolicy:
ret = QFormLayout::AllNonFixedFieldsGrow;
break;
+#endif
case SH_FormLayoutFormAlignment:
ret = Qt::AlignLeft | Qt::AlignTop;
break;
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 35e7060b72..3a43f146da 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -75,7 +75,9 @@
#include <qdialog.h>
#include <private/qwidget_p.h>
#include <QAbstractSpinBox>
+#if QT_CONFIG(label)
#include <QLabel>
+#endif
#include "qdrawutil.h"
#include <limits.h>
@@ -1414,11 +1416,13 @@ void QRenderRule::configurePalette(QPalette *p, QPalette::ColorGroup cg, const Q
static inline QObject *parentObject(const QObject *obj)
{
+#if QT_CONFIG(tooltip)
if (qobject_cast<const QLabel *>(obj) && qstrcmp(obj->metaObject()->className(), "QTipLabel") == 0) {
QObject *p = qvariant_cast<QObject *>(obj->property("_q_stylesheet_parent"));
if (p)
return p;
}
+#endif
return obj->parent();
}