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