#include #include #include #include "MainWidget.h" int main(int argc, char *argv[]) { setlocale(LC_ALL, ".utf-8"); QApplication a(argc, argv); #ifdef _WIN32 QFont font("Microsoft YaHei", 9); a.setFont(font); //a.setStyle("fusion"); //a.setStyle("windows"); #endif 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 MainWidget w; w.set_work_exe(argv[0]); w.show(); return a.exec(); }