I, QT application release
First, you need to compile the application in release mode and copy the compiled program file to the release folder.
Copy the following dynamic link library to the release Folder: mingwm10.dll, qtcore4.dll, qtgui4.dll, libgcc_s_dw2-1.dll. You can find them under "QT installation directory \ QT \ bin.
If other functions, such as OpenGL, are used, copy qtopengl4.dll to the release folder.
If the application has the function of accessing the database, you must not only copy qtsql4.dll to the release folder, but also copy the corresponding database Driver (also DLL, put it under the "Publish Folder \ sqldrivers" directory. You can find them from the "QT installation directory \ QT \ plugins \ sqldrivers", such as qsqlite4.dll.
If the application contains Chinese characters, you also need to create the codecs directory under the release folder and copy the qcncodecs4.dll under the "QT installation directory \ QT \ plugins \ codecs" directory.
For other functions provided in Plug-In mode, such as imageformats, you also need to copy all required DLL files in the above way.
2. Application (exe file) icon settings
Step 1:
First of all, you must prepare a. ICO icon file (Suppose it is qtdemo. ico) and copy it to the project directory (the directory where the. Pro file is located ).
Step 2:
In QT creator, CTRL + N or file-new file or project, select text file in general, and enter the name as the. RC file (such as qtdemo. Rc). Write only one line in it:
Idi_icon1 icon discardable "myicon. ICO"
Step 3:
Edit the. Pro file, which should include:
Other_files + = \ qtdemo. RC
Add another row under it (if there is no content above ):
Rc_file = \
Qtdemo. RC
Step 4:
Re-compile. All done!