OneLevelXmlOpr/main.cpp

33 lines
673 B
C++
Raw Normal View History

2024-05-15 08:34:54 +08:00
#include <QApplication>
#include <clocale>
2025-06-07 10:22:08 +08:00
#include <QFile>
#include "MainWidget.h"
2024-05-15 08:34:54 +08:00
int main(int argc, char *argv[])
{
setlocale(LC_ALL, ".utf-8");
2024-05-15 08:34:54 +08:00
QApplication a(argc, argv);
#ifdef _WIN32
2024-07-28 10:27:54 +08:00
QFont font("Microsoft YaHei", 9);
a.setFont(font);
2024-09-15 15:22:06 +08:00
//a.setStyle("fusion");
2025-06-07 01:50:29 +08:00
//a.setStyle("windows");
#endif
2025-06-07 10:22:08 +08:00
QFile file(":/QtTheme/theme/Flat/Light/Blue/Pink.qss");
if (file.open(QFile::ReadOnly)) {
a.setStyleSheet(file.readAll());
}
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
2024-05-15 08:34:54 +08:00
MainWidget w;
w.set_work_exe(argv[0]);
2024-05-15 08:34:54 +08:00
w.show();
return a.exec();
}