diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-02-27 20:08:29 -0800 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-03-03 21:55:27 +0000 |
commit | 7b796116ff4bf6398a551b24e4c2b19d449bcdc2 (patch) | |
tree | ac0794a30416edcc5b9a0243f574ac8f3725f3ad /src/widgets/styles/qstylehelper_p.h | |
parent | f892318898d61c26bf762a44e1e60579a7addef3 (diff) |
Move widget size policy methods to QStyleHelper
While they're relatively Mac-specific, conceivably multiple style
implementations could use them, and it breaks a tight coupling between
QStyleOption and QMacStyle.
Change-Id: I5915c519129538a9ac39a34d5cfc3aeb838145d6
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Diffstat (limited to 'src/widgets/styles/qstylehelper_p.h')
-rw-r--r-- | src/widgets/styles/qstylehelper_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/widgets/styles/qstylehelper_p.h b/src/widgets/styles/qstylehelper_p.h index 88eb05f1d7..8c30d3f4eb 100644 --- a/src/widgets/styles/qstylehelper_p.h +++ b/src/widgets/styles/qstylehelper_p.h @@ -87,6 +87,11 @@ namespace QStyleHelper #endif QColor backgroundColor(const QPalette &pal, const QWidget* widget = 0); QWindow *styleObjectWindow(QObject *so); + + enum WidgetSizePolicy { SizeSmall, SizeLarge, SizeMini, SizeDefault }; + + void setWidgetSizePolicy(const QWidget *w, WidgetSizePolicy policy); + WidgetSizePolicy widgetSizePolicy(const QWidget *w, const QStyleOption *opt = 0); } |