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 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> <<a href="mailto:lists@necoro.eu">lists@necoro.eu</a>>:
</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>> Another thing i wan to implement is to click on the systray of the app
<br>and<br>> hide it, and click again to show it. I was trying but without<br>success...<br>><br><br>this is how I've done it:<br><br>Qt.QObject.connect(self.systray,<br>Qt.SIGNAL("activated(QSystemTrayIcon::ActivationReason)"),
<br>self.cb_systray_activated)<br><br>def cb_systray_activated (self, reason):<br> if reason != Qt.QSystemTrayIcon.Context: # do not react on context menu<br>calls<br> if self.windowState() & Qt.Qt.WindowMinimized
: # window is minimized<br> self.show()<br> self.showNormal()<br> else: # window is not minimized<br> self.setWindowState(self.windowState() | Qt.Qt.WindowMinimized)<br>
<br>Regards,<br>Necoro<br><br><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">
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>