Gustavo A. Díaz schrieb:
> Another thing i wan to implement is to click on the systray of the app
and
> hide it, and click again to show it. I was trying but without
success...
>

this is how I've done it:

Qt.QObject.connect(self.systray,
Qt.SIGNAL("activated(QSystemTrayIcon::ActivationReason)"),
self.cb_systray_activated)

def cb_systray_activated (self, reason):
        if reason != Qt.QSystemTrayIcon.Context: # do not react on context menu
calls
        if self.windowState() & Qt.Qt.WindowMinimized: # window is minimized
                self.show()
                self.showNormal()
        else: # window is not minimized
                self.setWindowState(self.windowState() | Qt.Qt.WindowMinimized)

Regards,
Necoro


_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to