PDA

View Full Version : Getting the current application's font family as string



qlands
11th October 2011, 14:58
Hi,

How can I get the application's font (default font) family as a QString?

Thanks,
Carlos.

wysota
11th October 2011, 14:59
QFont::family()

qlands
11th October 2011, 16:30
Excellent.

I guess that if I set the application font to a family that does not exists, QT falls into default font. Is there any way to know that? that the font was not found and QT is switching to default?

Thanks,
Carlos.

Lykurg
11th October 2011, 17:58
Check QFontDatabase::families() for existing fonts.