Qt study notes - add icon program release to release version .exe

Qt program release

1. Copy the .ico icon file to the project directory helloworld and rename it to Myico.ico;

2. Create a new txt file in this project directory, enter: IDI_ICON1 ICON DISCARDABLE "Myico.ico" , save it as a file with the suffix prj.rc, and save it to this project directory.

3. Double-click the helloworld.pro file in Qt Creator, and add a line at the end:

RC_FILE  =  prj.rc

4. Run the program, you can see that the icon in the upper left corner of the pop-up box has been changed, and the .exe in the release is also replaced with a new icon.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326521318&siteId=291194637