add load font
This commit is contained in:
parent
042fa39472
commit
bd70248537
5
main.cpp
5
main.cpp
@ -1,10 +1,15 @@
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFontDatabase>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
int fontId = QFontDatabase::addApplicationFont(":/materialdesignicons-webfont.ttf");
|
||||
QString fontName = QFontDatabase::applicationFontFamilies(fontId).constFirst();
|
||||
qDebug() << "fontId" << fontId << ", fontName:" << fontName;
|
||||
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
|
Loading…
Reference in New Issue
Block a user