[PyQt] Application not hiding from taskbar

Hans Meine meine at informatik.uni-hamburg.de
Mon Dec 6 12:42:33 GMT 2010

Am Freitag 03 Dezember 2010, 14:40:17 schrieb Mikael Modin:
> I'm trying to implement minimize-to-tray but my application refuses to
> hide from taskbar.

That's obviously up to the window manager, but there's a difference between 
hidden and closed windows.  Closed windows should not appear in the taskbar, 
so try close()ing it instead.  (Of course, don't use destructive close, 
neither let the app quit if the last main window closes.)

>     def hideEvent(self, event):
>         self.hide()

This is certainly wrong.  You get a hideEvent *because* hide() was called.  No 
need to call it again.


More information about the PyQt mailing list