How does Qt pick a font for the application?

If you have not set a font for your application then the default font on your
machine will be used, and the default font can be different on different
machines. On Windows the default Windows font is used, on X11 the one in qtrc
can be used. If a default font can’t be found, then a font specified by Qt
will be used.

In order to get the same font for all machines you should set a font for your
application. Note that this font needs to be installed on the target machine.
You can find information on this subject here:

http://qt.nokia.com/doc/qfont.html

1 comment

December 5, 2010

Picture of xsacha xsacha

Lab Rat

This is very important for cross-platform applications.
Not just because of appearance, but different fonts may be set at different sizes. This can make your interface ugly or out of alignment.

Write a comment

Sorry, you must be logged in to post a comment.