[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Setting relative font sizes
From:       Raphael Kubo da Costa <kubito () gmail ! com>
Date:       2009-10-24 21:07:22
Message-ID: 68c3445d0910241407x7509db3bsd232f0e5c7e09177 () mail ! gmail ! com
[Download RAW message or body]

On Sat, Oct 24, 2009 at 6:32 PM, Stefan Majewsky <majewsky@gmx.net> wrote:
> Am Samstag 24 Oktober 2009 22:19:13 schrieb Raphael Kubo da Costa:
>> Currently, I have some QLabels with rich text in them, such as "<font
>> size=+1>foo</font>". I'm trying to move this kind of font setting to a
>> style sheet in the .ui, or even set it via QLabel::setStyleSheet,
>> however setting the style sheet to "font-size: larger;" or anything
>> that's not a pixel or point value doesn't work, and I don't know if
>> it's possible to set the size in a relative way (like the +1 that's
>> being used at the moment).
>
> font-size: 120%;
> font-size: 1.2em;
>
> Pack one of these in the stylesheet.
>
> Greetings
> Stefan

fileName->setStyleSheet("font-size: 120%;");

Doesn't change the font size at all (the 'em' version doesn't work either).

What's weird is that Qt's documentation states explicitly in
http://doc.trolltech.com/4.6-snapshot/stylesheet-reference.html#list-of-properties
that only px and pt metrics are supported, but the example for the
"font" property uses "large" for font-size.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic