Ok, nice tip <span style="font-weight: bold;">Necoro</span>! Thanks, but is not what i wanted.<br>I
have already a context menu which shows and hide the app, but i want to
replace that by doing on click on the systrayicon (left button click)
to show and to hide:
<br><br>Click on systray, hide...<br>Click on systray, show...<br><br>and so on and on...<br><br>By the way could you be more specific to my example app? Sorry to disturb you. :$<br><br>Thanks!!<br><br><span style="font-weight: bold;">

David: </span><br><br>Yes, i saw the QT example docs of systray, but does not help me much about the problem of when i close the app.<br>And
like i said, i dont know nothing about C++... indeed is not too
dificult to compare or convert the example to python/qt, but well... i
am doing&nbsp; my best.
<br>I will search later about that problem on QT forums.<br><br><div><span class="gmail_quote">2007/7/23, <a href="mailto:lists@necoro.eu">lists@necoro.eu</a> &lt;<a href="mailto:lists@necoro.eu">lists@necoro.eu</a>&gt;:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Gustavo A. Díaz schrieb:<br>&gt; Another thing i wan to implement is to click on the systray of the app
<br>and<br>&gt; hide it, and click again to show it. I was trying but without<br>success...<br>&gt;<br><br>this is how I&#39;ve done it:<br><br>Qt.QObject.connect(self.systray,<br>Qt.SIGNAL(&quot;activated(QSystemTrayIcon::ActivationReason)&quot;),
<br>self.cb_systray_activated)<br><br>def cb_systray_activated (self, reason):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if reason != Qt.QSystemTrayIcon.Context: # do not react on context menu<br>calls<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if self.windowState() &amp; Qt.Qt.WindowMinimized
: # window is minimized<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.show()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.showNormal()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else: # window is not minimized<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;self.setWindowState(self.windowState() | Qt.Qt.WindowMinimized)<br>
<br>Regards,<br>Necoro<br><br><br>_______________________________________________<br>PyQt mailing list&nbsp;&nbsp;&nbsp;&nbsp;<a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br><a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">
http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br><br clear="all"><br>-- <br>Gustavo A. Díaz<br>GDNet Projects<br><a href="http://www.gdnet.com.ar">www.gdnet.com.ar</a>