[PyQt] How can i capture activated signal of Tray Icon??

Jebagnana Das jebagnanadas at gmail.com
Wed Nov 10 15:30:03 GMT 2010


Thanks pete for your reply.

I think you've misunderstood the core of the problem. The problem here is
not the elif construct(Even changed the code, had no effect).

If we double click on the tray icon, on completion of the first click this
function gets called, and once again it's called when you finish your second
click.. Any solutions...

Am Tuesday 09 November 2010 15:08:29 schrieb Jebagnana Das:
> > Thanks Zoltan.. It did help a lot.. But if i want to capture single click
> > and double click events of the mouse separately i'm afraid this can't be
> > used..
> >
> > def onTrayIconActivated(self, reason):
> >         if reason == QSystemTrayIcon.DoubleClick:
> >             print('tray icon double clicked')
> >
> >         if reason == QSystemTrayIcon.Trigger:
> >             print("Tray icon single clicked")
> >
> > If i double click the tray icon it executes both if conditions. Any way
> of
> > resolving this?. Thanks again..
>
> elif instead of second if perhaps?
>
> Pete
>
>
> ------------------------------
>
> _______________________________________________
> PyQt mailing list
> PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
> End of PyQt Digest, Vol 76, Issue 18
> ************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101110/6b8874c1/attachment.html>


More information about the PyQt mailing list