PDA

View Full Version : Changing the Icon that is displayed in the Task Bar on Wundows



KenJustKen
15th November 2011, 23:50
Just need a pointer on where to go for this data.

What is the correct way to change the task bar bitmap for a program running? The icon for miscrosoft windows that is is displayed in the task bar at the bottom of the screen when by App is running.

Do I use the QSystemTrayIcon class?

Spitfire
16th November 2011, 16:53
if you mean the task bar then it's:
QWidget::setWindowIcon(QIcon(":/some.icon"));
if you mean the icon tray (usually in bottom right corner) then it's:
QSystemTrayIcon* icon = new QSystemTrayIcon(this);
icon->setIcon(QIcon(":/some.icon"));
icon->show();
But I guess it's not the second option as you would have to use it to show the icon in the first place.