Hi All,
I have to keep System tray icon when i executed my application..below is the code i written its working but the icon is not visible.
tray.
setIcon(QIcon( icon
));
//":/images/home.png")); tray.setContextMenu(&cmenu);
{
switch(reason)
{
{
if(isHidden()) show();
else hide();
break;
}
default: break;
}
}
QIcon icon;
icon.addPixmap(QPixmap(QString::fromUtf8(":/images/home.png")),
QIcon::Normal, QIcon::Off);
tray.setIcon(QIcon( icon));//":/images/home.png"));
tray.setContextMenu(&cmenu);
connect(&tray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
this, SLOT(trayActivated(QSystemTrayIcon::ActivationReason)));
void abc::trayActivated(QSystemTrayIcon::ActivationReason reason)
{
switch(reason)
{
case QSystemTrayIcon::Trigger:
{
if(isHidden()) show();
else hide();
break;
}
default: break;
}
}
To copy to clipboard, switch view to plain text mode
plz can anyone give idea about this.........
regards,
mkkguru
Bookmarks