And it does<div><br></div><div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

print("Tray icon single clicked")</blockquote><div><br></div><div>twice?</div><div> </div><br><div class="gmail_quote">On Wed, Nov 10, 2010 at 16:30, Jebagnana Das <span dir="ltr"><<a href="mailto:jebagnanadas@gmail.com">jebagnanadas@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><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"><div><div></div><div class="h5">
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" target="_blank">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></div></div>
End of PyQt Digest, Vol 76, Issue 18<br>
************************************<br>
</blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
PyQt mailing list    <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></blockquote></div><br><br clear="all"><br>-- <br>Nick Gaens<br>
</div>