diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-05-16 18:16:04 +0300 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-05-16 18:16:04 +0300 |
commit | 231d3670981a33ec42b91ad1cb33c1fc50551066 (patch) | |
tree | b1ef1096f4e279baaa2ea0d2daf14b5c4185a82f /src/widgets/styles/qstylesheetstyle.cpp | |
parent | ffdd372c7bbda62e9d937f406319f38e3e982774 (diff) | |
parent | 8fc1a885d19a2dfb1a3a684aea1cfa41967e041f (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.5' into tqtc/lts-5.15-opensourcev5.15.5-lts-lgpl
Change-Id: I0cdb390124e783dc9cd832a9954baa76a0e9eb6b
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 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); } } |