summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstylesheetstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/styles/qstylesheetstyle.cpp')
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 34f23d1b19..2ab9756f8d 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -121,6 +121,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>
@@ -2928,6 +2931,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);
}
}