diff options
author | Jens Bache-Wiig <jens.bache-wiig@digia.com> | 2012-11-01 11:47:37 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-01 20:17:57 +0100 |
commit | 70dea61670d0f66482442b41549de8ee19474fa6 (patch) | |
tree | 042c35790dd59ee7d5986594c0c4b41baafba9ed /src/widgets/styles/qstylehelper_p.h | |
parent | 8c15be7bb2488a17b2c2f62e2d2a7ed01dd331d6 (diff) |
Make ToolButton work with Macstyle for components
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 <jan-arve.saether@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/widgets/styles/qstylehelper_p.h')
-rw-r--r-- | src/widgets/styles/qstylehelper_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 <QtCore/qstring.h> #include <QtGui/qpolygon.h> #include <QtCore/qstringbuilder.h> +#include <QtGui/qaccessible.h> #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); } |