summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles
diff options
context:
space:
mode:
authorStephan Binner <stephan.binner@basyskom.com>2017-03-02 13:39:22 +0100
committerStephan Binner <stephan.binner@basyskom.com>2017-03-03 20:34:58 +0000
commitdc2512f3088d6f836ef06d35cbf1a5f7acb4ce7b (patch)
tree57d49188948653679bc98704e36629523008445f /src/widgets/styles
parent46bf3d71e58457afcc8177a68243ac71308534db (diff)
Add feature.label and feature.formlayout
Change-Id: Ic8dc0aee7f3fc0d8218ba709352b1378078c6070 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
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();
}