From 70dea61670d0f66482442b41549de8ee19474fa6 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 1 Nov 2012 11:47:37 +0100 Subject: Make ToolButton work with Macstyle for components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We needed a new helper function for this. The widget cast was breaking desktop components. By using accessible role, we can make it work for both use cases without depending on the widget. Change-Id: Ic854dc45a4e5b7a50c5be701e903d58a4a914ee5 Reviewed-by: Jan Arve Sæther Reviewed-by: Jens Bache-Wiig --- src/widgets/styles/qstylehelper_p.h | 2 ++ 1 file changed, 2 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 e47722bd9f..ab6a97e59a 100644 --- a/src/widgets/styles/qstylehelper_p.h +++ b/src/widgets/styles/qstylehelper_p.h @@ -44,6 +44,7 @@ #include #include #include +#include #ifndef QSTYLEHELPER_P_H #define QSTYLEHELPER_P_H @@ -81,6 +82,7 @@ namespace QStyleHelper void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect, int left = 0, int top = 0, int right = 0, int bottom = 0); + bool hasAncestor(QObject *obj, QAccessible::Role role); } -- cgit v1.2.3