I am a total beginner in QT, I am trying to add a customized font that I can use in my GUI but I couldn't. Any help please? I have already added the font to my Resources file but I don't know what to do next in order to use it.
Asked
Active
Viewed 197 times
-2
-
I think the QT documentation should be able to help you more than this forum. – StarShine Nov 17 '20 at 10:11
-
3Does this answer your question? [Add a custom font in Qt](https://stackoverflow.com/questions/8687653/add-a-custom-font-in-qt) – Botje Nov 17 '20 at 10:16
1 Answers
1
QFontDatabase::addApplicationFont(":/fonts/greatvibes.otf");
QFont myCustomFont("Great Vibes", 14, QFont::Normal);
ui->label->setFont(myCustomFont);

Андрей Сюткин
- 11
- 2
-
Thanks for your answer, I have already tried that but it didn't change anything. I think the problem might be in the font I have downloaded. – Mehdi bedoui Nov 17 '20 at 10:55