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