How to use qt to publish a program

1. Build a Release mode project Insert picture description here
after building successful, the folder in the project folder Release file generation .exe file:
Insert picture description here
Insert picture description here
if you run the .exe file error, not able to find a number of .dll files:
Insert picture description here
because the .exe file If there is a dependency on other files, you can use windeployqt to solve it, and release a complete set of programs and their dependent library files.

2. Find the Qt cmd tool in the start menu and open the corresponding version of the cmd command line
Insert picture description here
3. Enter the build directory:
run the command
windeployqt
Insert picture description here
Test.exe windeployqt will help us solve the file dependencies, the library files needed by the program are all generated in In the folder, and the resource file has also been compiled into the binary file.
Insert picture description here

Guess you like

Origin blog.csdn.net/Fengfgg/article/details/114131350