summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorDoris Verria <doris.verria@qt.io>2020-12-10 02:06:32 +0100
committerDoris Verria <doris.verria@qt.io>2020-12-11 11:02:05 +0100
commitf8f955151a6a218e1d274663c7c309b8eb6ca92a (patch)
tree1dfc3c6c48917e6542d581397e76644b39cf61a2 /src/widgets
parentd3ee976acab59019fdd781691f29e6f12e4dedc8 (diff)
Don't show focus rect for QCommandLinkButton
Since QPushButton sets WA_MacShowFocusRect attribute upon init, this will be set for QCommandLinkButton too. However, we do not want to draw the Mac focus frame for QCommandLink buttons so remove this attribute for them. Pick-to: 5.15 6.0 Change-Id: Ida7a437a54be078caaebc2c0744243d50e14a87f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/widgets/qcommandlinkbutton.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qcommandlinkbutton.cpp b/src/widgets/widgets/qcommandlinkbutton.cpp
index 4f0de092be..12b19a7d03 100644
--- a/src/widgets/widgets/qcommandlinkbutton.cpp
+++ b/src/widgets/widgets/qcommandlinkbutton.cpp
@@ -216,6 +216,7 @@ void QCommandLinkButtonPrivate::init()
Q_Q(QCommandLinkButton);
QPushButtonPrivate::init();
q->setAttribute(Qt::WA_Hover);
+ q->setAttribute(Qt::WA_MacShowFocusRect, false);
QSizePolicy policy(QSizePolicy::Preferred, QSizePolicy::Preferred, QSizePolicy::PushButton);
policy.setHeightForWidth(true);