40 lines
733 B
C++
Executable File
40 lines
733 B
C++
Executable File
/**
|
|
* @file main.cpp
|
|
* @author jinchao
|
|
* @brief 主函数
|
|
* @version 1.0
|
|
* @date 2025-03-10
|
|
*
|
|
* @copyright Copyright (c) 2025 COMAC
|
|
*
|
|
*/
|
|
#include "mainwindow.h"
|
|
#include <QApplication>
|
|
|
|
/**
|
|
* @brief 主函数
|
|
* @param argc 参数个数
|
|
* @param argv 参数列表
|
|
* @return 返回值
|
|
*/
|
|
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();
|
|
}
|