QT generates an EXE file with icons under Windows (IDE=QT Creator)
I personally love the IDE interface and operation of Qt creator, but perhaps not fully mature or for the code cross-platform, some features are not directly provided.
such as Windows software, at least as the main program or the EXE file launcher should generally have its own icon, QT Creator Although it is easy to set the small window icon, but does not provide the ability to set the EXE file icon.
In fact, it is not difficult to do.
• First of all, of course, prepare an. ico icon file (assumed to be Myicon.ico) and copy it to the project directory (the directory where the. Pro file resides).
• Then CTRL + N or file-new File or Project in Qt Creator
Select the text File in general
Name is filled with an. rc file (e.g. myrc.rc)
Just write a line in it:
Idi_icon1 ICON discardable "Myicon.ico"
• Edit the. Pro file, which should have:
+ = Apprc.rc
Add another line below it (if you don't have the above content):
rc_file = \
Myrc.rc
• Just compile it and the newly generated EXE will become Myicon.ico.
QT app icon