VC调用QT的UIDLL

阅读 132

2022-05-19

//VC程序
#include "../QTDLL/ExportDll.h"

int _tmain(int argc, _TCHAR* argv[])
{
printf("%d",add(1));
return 0;
}


DLL

#include "stdafx.h"
#include "ExportDll.h"
#include "ui_DLG.h"
int add(int a)
{
QApplication ap(a,NULL);
QWidget* w = new QWidget();
Ui_Form s;
s.setupUi(w);
s.pushButton->winId()

w->show();
ap.exec();
return a+1;

}





精彩评论(0)

0 0 举报