-
Notifications
You must be signed in to change notification settings - Fork 155
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (28 loc) · 723 Bytes
/
main.cpp
File metadata and controls
29 lines (28 loc) · 723 Bytes
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
#include "src/test/mainwidget.h"
#include "src/main/mainwindow.h"
#include <QApplication>
#include <QTextCodec>
#include <QFile>
//#define MAIN_TEST
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
QTextCodec::setCodecForLocale(codec);
QTextCodec::setCodecForCStrings(codec);
QTextCodec::setCodecForTr(codec);
#endif
QFile qss(":/qss/default");
qss.open(QFile::ReadOnly);
qApp->setStyleSheet(qss.readAll());
qss.close();
#ifdef MAIN_TEST
MainWidget w;
w.show();
#else
MainWindow *w = new MainWindow;
w->show();
#endif
return a.exec();
}