-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.cpp
34 lines (27 loc) · 993 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "mainwindow.h"
#include <QApplication>
#include <QDebug>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
int id = QFontDatabase::addApplicationFont(":/font/Consolas/consola.ttf");
qDebug() << QFontDatabase::applicationFontFamilies(id);
id = QFontDatabase::addApplicationFont(":/font/Consolas/consolab.ttf");
qDebug() << QFontDatabase::applicationFontFamilies(id);
id = QFontDatabase::addApplicationFont(":/font/Consolas/consolai.ttf");
qDebug() << QFontDatabase::applicationFontFamilies(id);
id = QFontDatabase::addApplicationFont(":/font/Consolas/consolaz.ttf");
qDebug() << QFontDatabase::applicationFontFamilies(id);
QFont font;
font.setFamily("Consolas");
qApp->setFont(font);
QFile qss(":/qdarkstyle/style.qss");
qss.open(QFile::ReadOnly);
qApp->setStyleSheet(qss.readAll());
qss.close();
MainWindow w;
w.show();
w.resize(QSize(850, 600));
w.setFocus();
return a.exec();
}