Stylesheets and plasma widgets

alan moore me at alandmoore.com
Fri Sep 11 05:02:45 CEST 2009


Aaron J. Seigo wrote:
> On September 10, 2009, alanm wrote:
>> Is there a better way to make these kinds of small adjustments apart from
>> style sheets?
> 
> set the font style/face/color on the nativeWidget()?
> 
Thanks; I tried this, but it didn't work (or else I'm doing it wrong).
My code is:

button.nativeWidget().setFont(QFont("sans",6))

What happens is the button shrinks down to the size it would be if the 
font were actually 6 point font, but the text is then drawn according to 
the size/face settings for plasma/KDE (which results in the text getting 
cut off).

Sorry in advance if I'm doing something painfully obviously wrong.


More information about the Plasma-devel mailing list