Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Read application ICON and set it as Toolbar Image
Hi,
I am developing one application using QT. I want to read the application ICON and set this ICON as the image of my toolbar. I used the following code.
QPixmap *appIcon=const_cast<QPixmap*> (mainWindow->icon());
QPixmap mapp=*appIcon;
mainWindow->primaGamesAction->setIconSet(QIconSet(mapp));
mainWindow is the main UI. I just read the icon of this widget and want to set the tool bar Image with this icon.
This does not work. Please suggest how to do this.
Thanks in advance.
Best of regards,
Su