And it does print("Tray icon single clicked")
twice? On Wed, Nov 10, 2010 at 16:30, Jebagnana Das <jebagnana...@gmail.com> wrote: > > 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@riverbankcomputing.com >> http://www.riverbankcomputing.com/mailman/listinfo/pyqt >> >> End of PyQt Digest, Vol 76, Issue 18 >> ************************************ >> > > > _______________________________________________ > PyQt mailing list PyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > -- Nick Gaens
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt