From af632e20562cfaeac509143ac0ee137684ecef82 Mon Sep 17 00:00:00 2001 From: Doris Verria Date: Thu, 10 Dec 2020 02:06:32 +0100 Subject: [PATCH] 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 (cherry picked from commit f8f955151a6a218e1d274663c7c309b8eb6ca92a) Reviewed-by: Doris Verria --- src/widgets/widgets/qcommandlinkbutton.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/widgets/widgets/qcommandlinkbutton.cpp b/src/widgets/widgets/qcommandlinkbutton.cpp index 74c5ec8d089..3ec11ed6318 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);