[Qt-interest] Picking default fonts
Arnold Krille
arnold at arnoldarts.de
Mon Mar 22 15:30:08 CET 2010
On Monday 22 March 2010 15:13:26 Nikos Chantziaras wrote:
> 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?
If Qt is only half as good in "lightening your burden" it does this on all
platforms supported. Together with picking the right colours from the palette,
selecting the right style, following the toolbar preferences, following the
right-handed/left-handed mouse settings and selecting the users language for
translations (if they exist for the app).
PS: Yes, Qt is lightening your burden in that it does all the named things for
you:-)
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100322/c4dab726/attachment.bin
More information about the Qt-interest-old
mailing list