[Qt-interest] Picking default fonts

Nikos Chantziaras realnc at arcor.de
Mon Mar 22 15:13:26 CET 2010


On 03/21/2010 11:49 PM, Thiago Macieira wrote:
> Em Domingo 21. Março 2010, às 21.45.16, Nikos Chantziaras escreveu:
>> On Gnome and KDE, there are default "general" and "fixed width" fonts.
>> That way, all applications that need to display fixed-width fonts (like
>> a text editor) always use the font the user set globally.  Is there any
>> way I can get those fonts from within a Qt application?  I guess the
>> default QApplication::font() would be the "general" font.  What about
>> the default fixed-width font?  Right now I simply use "Courier" for
>> fixed-width fonts, but that's not a nice behavior.
>
> Use these generic font names:
> 	Sans
> 	Serif
> 	Monospace

Thanks.  This works.  Is this something that Qt takes care of and makes 
it work on all platforms, or this a Linux-only thingy?



More information about the Qt-interest-old mailing list