tags:

views:

2679

answers:

2

How do you set application icon for application made in QtCreator. Is there some easy way?

+8  A: 

For Windows you need to create a .rc file and add it to your project (.pro). The RC file should look like this:

IDI_ICON1 ICON DISCARDABLE "path_to_you_icon.ico"

The .pro entry should also be win32 specific, e.g.:

win32:RC_FILE = MyApplication.rc
Rob
To be safe you should use `win32:RC_FILE += MyApplication.rc`
dwj
+8  A: 

It depends on which platform(s) you are targetting : See Qt's documentation

Fred
Well, question was how you do it from QtCreator Ide. The documentation points me to do it with Visual Studio.
Pavels
The question didn't specify which OS you are using, and the documentation covers all platforms. The doc mentions Visual Studio only in the creation of the ICO file which has nothing to do with setting the application icon. On Windows, setting the application icon is done by creating a text file (.rc) which can be done with QtCreator, and adding a line in the project file (.pro), which can also be done with QtCreator.
Fred