So, it isn't possible to set the icon for all environments at the same time ?
So, it isn't possible to set the icon for all environments at the same time ?
You didn't follow and read the links, did you? The icon, which typically displayed in the top-left corner of a window, is set by calling QApplication::setWindowIcon() or QWidget::setWindowIcon():
- QApplication::setWindowIcon() <== set default window icon for all windows in the application
- QWidget::setWindowIcon() <== set window icon for a specific window
This approach is platform independent.
However, if you want to set an icon for the executable, which is seen in file managers and such, you must use platform dependent solutions. This is all explained in Setting the Application Icon.
J-P Nurmi
Thanks jpn.
What I need is setting the icon for the executable.
This is the reason why I told about the rc and qrc files
And yes, I have read the links![]()
Ok, in this case there is no other way around than using platform dependent solutions described in.. you already know where.Qt's resource files (.qrc) won't help you with this. You will have to use a Windows resource file (.rc) on Windows and/or other mechanisms appropriate to the platform in question.
J-P Nurmi
Thanks jpn.
I wasn't sure of it, cause Qt is made in order not to be plateform dependant, so I expected there was an other solution.
Bookmarks