3 Attachment(s)
Why QStyle dosen't changes the standard font?
Hi all, I want to know how to set to the standard font of a specified style (winxp, win, platique,...). I change the style of my app in this way:
but it only changes the colors to the standard palette of the style (the font is always the windows xp font). I attach an image from Qt docs that shows how is the standard font of each style. I specially want to know the font of the 'plastique' style
Thanks.
Re: Why QStyle dosen't changes the standard font?
Styles don't have default fonts associated with them. Take a look at QStyle class.
Re: Why QStyle dosen't changes the standard font?
Quote:
Originally Posted by wysota
Styles don't have default fonts associated with them. Take a look at
QStyle class.
Yes so it seems, but it's a little strange that when the docs shows a widget in a specified style it's shown with a different font for each style and is always the same for each style, don't you think? I think that the font style should be something related with the app style...
Does anybody knows which font and metrics is used with plastique style example widgets?
Re: Why QStyle dosen't changes the standard font?
Quote:
Originally Posted by Dark_Tower
Does anybody knows which font and metrics is used with plastique style example widgets?
:confused:
Re: Why QStyle dosen't changes the standard font?
Why don't you look at their sources? They probably use the default font for your system.
Re: Why QStyle dosen't changes the standard font?
Quote:
Originally Posted by wysota
Why don't you look at their sources? They probably use the default font for your system.
Yes wysota that's exactly what they do and that's exactly the problem. I think that each style sould has assciated its own font style like seem in the docs... Why doesn't?
Re: Why QStyle dosen't changes the standard font?
Because they were probably taken on different platforms. If you associated a particular font with each style, what would happen if that exact font was not available on the system? You couldn't use that style there.
Re: Why QStyle dosen't changes the standard font?
Quote:
Originally Posted by wysota
Because they were probably taken on different platforms. If you associated a particular font with each style, what would happen if that exact font was not available on the system? You couldn't use that style there.
Sounds a bit harsh wysota. I think that the style could check if the font is present on the system or something. If don't, set the default font... ;)
Re: Why QStyle dosen't changes the standard font?
Look at it a different way. When I set the fonts for my system as a whole, I expect ALL applications to abide by it. If I want a special font for a particular application, I can (under Unix at least) use the -font command line option.