QT program distribution

Programming environment win10 QT5.14.2

After the program is written, it needs to be distributed to other people. Here is the distribution of QT

 

window platform

  1. Need to use windeployqt.exe
  2. For convenience, I added his path to the environment variable C:\Qt\Qt5.14.2\5.14.2\mingw73_32\bin
  3. Run windeployqt Test.exe under the generated exe
  4. You can copy the exe separately and execute the command in the exe position so that the previous intermediate files will not be included

Add main window icon

Add files to the project, then add RC_ICONS = logo.ico in pro

Problem discovery

It is found that even if you run windeployqt, some dlls will not be copied in. If you set the environment variable, you may not feel it when running on this machine, but there will be problems on other machines. It needs to be in C:\Qt\Qt5.14.2 Copy related files in \5.14.2\mingw73_32\bin, you need to copy here

libstdc++-6.dll, libgcc_s_dw2-1.dll, libwinpthread-1.dll these three files

 

Guess you like

Origin blog.csdn.net/shaynerain/article/details/106204226