QTCreator Application Icon
i try to set application icon but it doesn't work.
What i did :
-I have create ressource.rc file and add :
IDI_ICON1 ICON DISCARDABLE "gear.ico"
-I have push gear.ico in the .pro folder :
-And my .pro file :
What is the problem ? My application icon don't change.
Thanks advanced for the help.
[EDIT: code formatting, Volker]
add line to end of your .pro file:
@win32:RC_FILE = ressource.rc@
Nothing has changed.
For what it's worth, I have in my .rc file:
DI_ICON1 ICON DISCARDABLE "application.ico"
Note, that it's DI_ICON1, not IDI_ICON1 (the first I is superfluous).
I'm creating a secondary window and showing it using showFullScreen, and it's ALT-TAB icon is the generic app icon. Using IDI_ICON1 instead of DI_* fixes that, and appears to work everywhere else as well. I'm actually using both, since I'm trying to maintain functionality across Windows platforms from XP to 8.
You can set an app for Qt application in code. No .rc files needed, and all further windows will automatically inherit this icon.
@// in main.cpp
QApplication a(argc, argv);
On OS X program crashes on a.setWindowIcon line ( that's why preprocessor directives). As I know, you need to use apple ico format, but i didn't test it in theory ( I worked on friends macbook back then ).
Yeah, I think Jake is Right... Try By using and write us whether it works or not.