summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDoris Verria <doris.verria@qt.io>2020-12-10 02:06:32 +0100
committerTarja Sundqvist <tarja.sundqvist@qt.io>2021-02-09 16:31:26 +0200
commitaf632e20562cfaeac509143ac0ee137684ecef82 (patch)
treeeef218601722d0b74887af7f71d00b423d6cfd5a /src
parent03b3348af9a3798e4bbdb5a971e99edf30cda092 (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. Change-Id: Ida7a437a54be078caaebc2c0744243d50e14a87f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f8f955151a6a218e1d274663c7c309b8eb6ca92a) Reviewed-by: Doris Verria <doris.verria@qt.io>
Diffstat (limited to 'src')
-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 74c5ec8d08..3ec11ed631 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);