summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qcommandlinkbutton.cpp
diff options
context:
space:
mode:
authorJens Bache-Wiig <jbache@trolltech.com>2009-03-30 16:30:50 (GMT)
committerJens Bache-Wiig <jbache@trolltech.com>2009-03-30 16:33:28 (GMT)
commit3fcccf015b2a5c31424e17c996b4a35bcd040c8c (patch)
treee938fc7fc0d98e5cb27030242a0797c196937f95 /src/gui/widgets/qcommandlinkbutton.cpp
parent25fcffe289e5117c71335bb7fe259751056d4dda (diff)
downloadQt-3fcccf015b2a5c31424e17c996b4a35bcd040c8c.zip
Qt-3fcccf015b2a5c31424e17c996b4a35bcd040c8c.tar.gz
Qt-3fcccf015b2a5c31424e17c996b4a35bcd040c8c.tar.bz2
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
Diffstat (limited to 'src/gui/widgets/qcommandlinkbutton.cpp')
-rw-r--r--src/gui/widgets/qcommandlinkbutton.cpp9
1 files 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;
}