QT win32创建窗口
1. win32主窗口修改参数 及增加窗口类的头文件(mainClass.h) #include <QtWidgets/QApplication> //#include <QtCore/QCoreApplication> #include "mainClass.h" int main(int argc, char *argv[]) { //QCoreApplication a(argc, argv); QApplication a(argc, argv); QFont font("ZYSong18030", 12); a.setFont(font); mainClass *myClass = new mainClass(0); myClass->initDlg(); return a.exec(); } 2. 创建QT类: 1. 头文件 #pragma once #include <QObject> #include "QtWidgets/qmainwindow.h" #include "QtWidgets/qsplitter.h" #include "QtCore/qobject.h" #include "QtWidgets/qlabel.h" #include "QtWidgets/qtextedit.h" #include "QtWidgets/qpushbutton.h"