VC调用QT的UIDLL

//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;

}

  

原文地址:https://www.cnblogs.com/ahuo/p/5522697.html