diff options
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r-- | src/widgets/styles/qstylesheetstyle.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp index 04a3b3a352..a45401fd1f 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -123,6 +123,9 @@ #if QT_CONFIG(toolbar) #include <QtWidgets/qtoolbar.h> #endif +#if QT_CONFIG(pushbutton) +#include <QtWidgets/qpushbutton.h> +#endif #include <QtGui/qpainterpath.h> #include <QtGui/qscreen.h> @@ -2943,6 +2946,12 @@ void QStyleSheetStyle::polish(QWidget *w) if (!rule.hasBackground() || rule.background()->isTransparent() || rule.hasBox() || (!rule.hasNativeBorder() && !rule.border()->isOpaque())) w->setAttribute(Qt::WA_OpaquePaintEvent, false); + if (rule.hasBox() || !rule.hasNativeBorder() +#if QT_CONFIG(pushbutton) + || (qobject_cast<QPushButton *>(w)) +#endif + ) + w->setAttribute(Qt::WA_MacShowFocusRect, false); } } |