From 7b796116ff4bf6398a551b24e4c2b19d449bcdc2 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Mon, 27 Feb 2017 20:08:29 -0800 Subject: 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 --- src/widgets/styles/qstylehelper_p.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/widgets/styles/qstylehelper_p.h') 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); } -- cgit v1.2.3