This article demonstrates how to package the Qt application into IE and publish it. 1. Example Qt program: Create a project and select the Qt Library type. The class name is ClassDemo. Create a new QtGui class (inheriting QWidge) Class Name ClassGui and add QLabel or QPushButton to the ClassGui ui. Add a member variable pointer of the ClassGui type in ClassDemo, add a public member function GetWidget, and return the pointer. Compile and generate the dynamic library classdemo. dll. 2. Shell Qt program: Create a project and select the ActiveQtServer type. The class name is ClassServer. Add a member variable pointer of the ClassDemo type to ClassServer. Add the following code to the constructor: m_classdemo = new ClassDemo (this); QLayout * exist_layout = this-> layout (); if (exist_layout) {delete exist_layout ;} QGridLayout * layout = new QGridLayout; layout-> addWidget (m_classdemo-> GetWidget (),); layout-> setContentsMargins (,); this-> setLayout (layout ); compile and generate the dynamic library classserver. dll. 3. compile the installation information file classserver. inf will classserver. find all the libraries that the dll depends on, which may include the following: classserver. dllclassdemo. dllQtGuid4.dllQtCored4. dllmsvcp90d. dllmsvcr90d. the dll file contains the following content: [Version] signature = "$ CHICAGO $" AdvancedINF = 2.0 [Add. code] classdemo. dll = classdemo. dllclassserver. dll = classserver. dllQtGuid4.dll = QtGuid4.dllQtCored4. dll = QtCored4.dllmsvcp90d. dll = msvcp90d. dllmsvcr90d. dll = msvcr90d. dll [classdemo. dll] file-win32-x86 = thiscab [QtGuid4. Dll] file-win32-x86 = thiscab [QtCored4.dll] file-win32-x86 = thiscab [msvcp90d. file-win32-x86 = thiscabDestDir = 11 [msvcr90d. dll] file-win32-x86 = thiscabDestDir = 11 [classserver. dll] file-win32-x86 = thiscabclsid = {AAF5BD93-5D87-4741-8804-A8869DF7048A} FileVersion =, RegisterServer = yes where the value of the clsid part can be in classserver. in cpp, find the first of five in QAXFACTORY_DEFAULT. 4. Package: Download the cab packaging tool (link: http://download.csdn.net/detail/fm0517/5114431 ). Run the following command: cabarc. exe n cabname. cab classdemo. dll classserver. dll QtGuid4.dll QtCored4.dll msvcp90d. dll msvcr90d. dll classserver. inf, cabname. cab is the name of the cab package, and the following parameters are all related dynamic libraries and installation information files. 5. example: <HTML> <HEAD> <TITLE> New Page </TITLE> </HEAD> <BODY> <br> </br> <object ID = "QSimpleAX" width = 500 height = 300 CLASSID = "CLSID: AAF5BD93-5D87-4741-8804-A8869DF7048A "CODEBASE =" cabname. cab "> </object> </BODY> </HTML> where CLSID is the same Clsid in the nf file. CODEBASE is the name of the cab package. You must put the cab package and html file in the same directory. 6. Release: install apache or tomcat and put the cab package and html in the corresponding directory. Once packaged as a cab, you do not need to run Regsvr registration on the local machine.