From 3fcccf015b2a5c31424e17c996b4a35bcd040c8c Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Mon, 30 Mar 2009 18:30:50 +0200 Subject: Allow setting font properties for Command Link Buttons Command link buttons use special fonts for labels and description. So when you set this property in designer the point size property is ignored. We now allow you to override these properties. Task-number:232466 Reviewed-by:Prasanth Ullattil --- src/gui/widgets/qcommandlinkbutton.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/widgets/qcommandlinkbutton.cpp b/src/gui/widgets/qcommandlinkbutton.cpp index 13ee6af..92d89a1 100644 --- a/src/gui/widgets/qcommandlinkbutton.cpp +++ b/src/gui/widgets/qcommandlinkbutton.cpp @@ -140,10 +140,12 @@ QFont QCommandLinkButtonPrivate::titleFont() const Q_Q(const QCommandLinkButton); QFont font = q->font(); if (usingVistaStyle()) { - font.setPointSizeF(12.0); + if (!q->testAttribute(Qt::WA_SetFont)) + font.setPointSizeF(12.0); } else { font.setBold(true); - font.setPointSizeF(9.0); + if (!q->testAttribute(Qt::WA_SetFont)) + font.setPointSizeF(9.0); } return font; } @@ -152,7 +154,8 @@ QFont QCommandLinkButtonPrivate::descriptionFont() const { Q_Q(const QCommandLinkButton); QFont font = q->font(); - font.setPointSizeF(9.0); + if (!q->testAttribute(Qt::WA_SetFont)) + font.setPointSizeF(9.0); return font; } -- cgit v0.12