28 lines
793 B
C++
28 lines
793 B
C++
#include "QMainwindow.h"
|
|
#include <QtWidgets/QApplication>
|
|
#include "BZStruct.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
|
|
QApplication a(argc, argv);
|
|
a.setWindowIcon(QIcon(":/QMainwindow/main.ico")); // 主窗口图标
|
|
QFile styleFile("D:\\Projects\\Trade\\QTradeProgram\\QMainwindow\\styles\\dark_theme.qss");
|
|
if (styleFile.open(QIODevice::ReadOnly | QIODevice::Text))
|
|
{
|
|
//QString styleSheet = QLatin1String(styleFile.readAll());
|
|
//a.setStyleSheet(styleSheet);
|
|
//styleFile.close();
|
|
}
|
|
// 注册自定义类型(必须调用!)
|
|
qRegisterMetaType<BigOrderInfo>("BigOrderInfo");
|
|
|
|
// 对于信号槽中的引用类型,还需注册引用版本
|
|
qRegisterMetaType<BigOrderInfo>("BigOrderInfo&");
|
|
|
|
QMainwindow w;
|
|
w.setWindowIcon(QIcon(":/QMainwindow/main.ico")); // 主窗口图标
|
|
w.show();
|
|
return a.exec();
|
|
}
|