Qt-interest Archive, May 2008
Method of selecting a sane font
Message 1 in thread
Hi, Is there a standard way to select a sane application font?
I'm using this code to pick my fonts (able to override by the user, but
I need sane defaults to start with).
QFont df ("");
df.setFixedPitch (false);
df.setItalic (false);
df.setBold (false);
df.setPointSize (10);
df.setStrikeOut (false);
df.setUnderline (false);
app.setFont (df);
Later on, I use the exact same code, except I set the setFixedPitch
parameter to true because the widget needs a fixed width font.
The problem is that this code doesn't seem to work. The font it picks is
nasty looking, and the rawName() returns "Multi" on my Debian laptop.
--
[ signature omitted ]