Setting the Application Icon on Windows
First, create an ICO format bitmap file that contains the icon image. This can be done with e.g. Microsoft Visual C++: SelectFile|New, then select theFiletab in the dialog that appears, and chooseIcon. (Note that you do not need to load your application into Visual C++; here we are only using the icon editor.)
Store the ICO file in your application's source code directory, for example, with the namemyappico.ico. Then, create a text file called, say,myapp.rcin which you put a single line of text:
IDI_ICON1 ICON DISCARDABLE "myappico.ico"Finally, assuming you are using qmake to generate your makefiles, add this line to yourmyapp.profile:
RC_FILE = myapp.rcRegenerate your makefile and your application. The .exefile will now be represented with your icon in Explorer.
If you do not use qmake, the necessary steps are: first, run thercprogram on the.rc file, then link your application with the resulting.resfile.
这里给一个icon图标下载的网址: