title: Hide window from taskbar
body: <p>I'm trying to minimize a window to the tray, but it seems it refuses to hide from the taskbar. I've spent a little time and distilled the problem code down to this. It's not mcuh so I'm wondering if I need something else to hide my app to tray in Windows 7.</p>
  
  <pre><code>import sys, os
  from PyQt4 import uic 
  from PyQt4.QtGui import QMainWindow, QApplication
  
  class MyClass(QMainWindow):
      def __init__(self, parent = None):
          QMainWindow.__init__(self, parent)
          self.ui = uic.loadUi(os.path.join("gui", "timeTrackerClientGUI.ui"), self)
      def hideEvent(self, event):
          self.hide()
      def showEvent(self, event):
          self.show()
  
  if __name__ == '__main__':
      app = QApplication(sys.argv)
      wnd = MyClass()
      wnd.show()
      app.exec_()
  </code></pre>
  
  <p>It seems the application icon does hide but then another one pops up, If I click the taskbar icon multiple times I can get these two icons flickering, looks kind of like this for a splitsecond before the first one hides:</p>
  
  <p><img src="https://i.stack.imgur.com/ND6Fp.png" alt="alt text"></p>