Font changes not aplying
Solved
General and Desktop
-
@SGaist More or less, what I did to test that the font is working is this:
int id = QFontDatabase::addApplicationFont( "/usr/share/fonts/truetype/Open_Sans/OpenSans-Regular.ttf"); QString family = QFontDatabase::applicationFontFamilies(id).at(0); QFont monospace(family); qApp->setFont(monospace);
But it doesn't work.... No idea what can be happening
-
What is the value of id ?
-
Use the debugger then or a dummy widget.
-
@cxam said:
hi, just small question.
Since addApplicationFont dont return -1 for error, i wonder if he need to NEW the font as they talk about here
https://forum.qt.io/topic/23875/how-to-use-qfontdatabase-addapplicationfont
?