[Qt-interest] Signal not found for qsystemtrayicon

Bijay Panda bijaykumar.mail at gmail.com
Fri Jan 29 07:11:14 CET 2010


Hi List,
Here I am trying to implement systemtray icon for my software.But unable to
get it done.
Please give your idea. My code is like below:

  void SDAServer::createWidget()

{

//

//

tray = new QSystemTrayIcon(this);

if(tray->isSystemTrayAvailable())

printf("Available\n");

tray->setIcon (QIcon("someicon.png"));

tray->setToolTip("System trayIcon example");

tray->show();

 connect(tray, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this,
SLOT(trayActivated(QSystemTrayIcon::ActivationReason)));


 }


 void SDAServer::trayActivated(QSystemTrayIcon::ActivationReason reason)

{

cout<<"Inside the trayActvated slot.."<<endl;

if (reason == QSystemTrayIcon::Trigger)

toggleVisibility();

cout<<" came to tray"<<endl;

}

...

Here I am unable to get the tray icon in the system tray.Also control is not
coming inside the slot trayActivated(QSystemTrayIcon::ActivationReason
reason).

Any help is appreciated.

-- 
Thanks & Regards
Bijay Kumar Panda
Mob-9739591816
bijaykumar.mail at gmail.com
bijaykumar_panda at yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100129/9ac85e70/attachment.html 


More information about the Qt-interest-old mailing list