Set custom font on Windows 10 PC working but on Androird 10 not. Qt 6.4.2 C++
Solved
General and Desktop
-
Hi Guys!
I have an app and I set this custom font in this way:int main(int argc, char *argv[]) { QApplication a(argc, argv); LoginWindow l; QFile styleFile( ":/QSS/default.qss" ); styleFile.open( QFile::ReadOnly ); a.setStyleSheet( styleFile.readAll() ); l.show(); //here is the setting the custom font QFontDatabase::addApplicationFont(":/RES/FantaisieArtistique.ttf"); qApp->setFont(QFont("FantaisieArtistique", 11, QFont::Normal, false)); return a.exec(); }
And in windows PC build its correct (the ttf file is in the qrc file and i did not install this font):
But on android 10:
Thanks for your help! -
Have you tried with a different Qt version? Maybe it's simply a bug.
-
K Kaguro has marked this topic as solved on
-
No problem at all, this kind of thing happens to all of us :-)