<br>Thanks pete for your reply. <div><br></div><div>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). <div><br></div><div>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...<br>
<div><br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Am Tuesday 09 November 2010 15:08:29 schrieb Jebagnana Das:<br>
> Thanks Zoltan.. It did help a lot.. But if i want to capture single click<br>
> and double click events of the mouse separately i'm afraid this can't be<br>
> used..<br>
><br>
> def onTrayIconActivated(self, reason):<br>
> if reason == QSystemTrayIcon.DoubleClick:<br>
> print('tray icon double clicked')<br>
><br>
> if reason == QSystemTrayIcon.Trigger:<br>
> print("Tray icon single clicked")<br>
><br>
> If i double click the tray icon it executes both if conditions. Any way of<br>
> resolving this?. Thanks again..<br>
<br>
elif instead of second if perhaps?<br>
<br>
Pete<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
PyQt mailing list<br>
<a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
<br>
End of PyQt Digest, Vol 76, Issue 18<br>
************************************<br>
</blockquote></div><br></div></div></div>