From f8f955151a6a218e1d274663c7c309b8eb6ca92a Mon Sep 17 00:00:00 2001 From: Doris Verria Date: Thu, 10 Dec 2020 02:06:32 +0100 Subject: 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 --- src/widgets/widgets/qcommandlinkbutton.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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); -- cgit v1.2.3