[PyQt] How to minimize the QMainwindow to the system Tray

Russell Valentine russ at coldstonelabs.org
Mon Mar 8 18:32:58 GMT 2010


Reimplement changeEvent in QMainWindow, something like below:

     def changeEvent(self, e):
         if(e.type() == QtCore.QEvent.WindowStateChange and 
self.isMinimized()):
             self.hide()
             e.accept()
             return
         else:
             super(Window, self).changeEvent(e)

sindhuja venkat wrote:
> Hi......I am doing an application in PyQt4.
> Do anyone know how to reduce the application to the system Tray?
> When I click the minimize button, the application should go to the tray.
> If anybody knows, your help is most welcome.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt



More information about the PyQt mailing list