PDA

View Full Version : How to set icon for the exe in debug and release folder using qt?



Gokulnathvc
13th January 2012, 09:19
How to set icon for the exe in debug and release folder using qt?
I have added the resourcefile and made the following change.

app.setWindowIcon(QIcon(QString(":/images/ocz_32x32.bmp")));

I have tried this, but while executing the application , i can see the icon on the top left corner of the window. I would like to see the icon in the debug folder and release folder as well. How to set icon for the exe.

ChrisW67
13th January 2012, 10:04
After 240 posts you still haven't worked out that Qt Assistant should be the first place you look for answers.
Open Qt Assistant, and search for "application icon" in the index.

Gokulnathvc
13th January 2012, 11:01
I have tried that method from Qt assistant. Setting the application icon . Again the same result..

pkj
13th January 2012, 11:36
I think you mean the icon of the executable file itself. Go through this (http://doc.qt.nokia.com/4.7-snapshot/appicon.html) link.

Gokulnathvc
13th January 2012, 11:38
yes. the icon of the executable. I have tried with the above method. It doesnt work.

pkj
13th January 2012, 11:47
you are using bmp image. This is platform dependent, assigning icon to .exe files. For windows, it has to be ico file. And the functionality provided in the link is NOT broken. I can vouch for that. Please go through it a bit more carefully