Sunday, July 6th 2008, 3:01pm UTC+1

You are not logged in.

  • Login
  • Register

1

Friday, May 9th 2008, 7:53am

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
  • Go to the top of the page

Rate this thread