35 lines
609 B
C++
35 lines
609 B
C++
|
/**
|
||
|
* @file main.cpp
|
||
|
* @author jinchao
|
||
|
* @brief 主函数
|
||
|
* @version 1.0
|
||
|
* @date 2025-02-14
|
||
|
*
|
||
|
* @copyright Copyright (c) 2025 COMAC
|
||
|
*
|
||
|
*/
|
||
|
#include "mainwindow.h"
|
||
|
|
||
|
#include <QFile>
|
||
|
#include <QTextStream>
|
||
|
#include <QApplication>
|
||
|
|
||
|
int main(int argc, char *argv[])
|
||
|
{
|
||
|
QApplication a(argc, argv);
|
||
|
|
||
|
// 设置主题
|
||
|
QFile file(":qdarkstyle/dark/darkstyle.qss");
|
||
|
if (file.open(QFile::ReadOnly)) {
|
||
|
QTextStream stream(&file);
|
||
|
QString styleSheet = stream.readAll();
|
||
|
a.setStyleSheet(styleSheet);
|
||
|
}
|
||
|
|
||
|
// 创建主窗口
|
||
|
MainWindow w;
|
||
|
w.show();
|
||
|
|
||
|
return a.exec();
|
||
|
}
|