title: How to hide taskbar icon of a PyQt4 Python application?
body: <p>I want to create a windows desktop widget. I will create a custom UI for the widget in Qt Designer and add functionality using Python. But, I do not want the application to have an icon on the taskbar at all. How should I modify my code and make my application (and its instances or other similar applications) to have no task bar footprint?</p>
  
  <p>How can I hide the taskbar icon on windows? Here is an example code:</p>
  
  <pre><code>import sys
  from PyQt4 import QtGui
  from PyQt4.uic import loadUiType
  
  Ui_MainWindow, QMainWindow = loadUiType('try.ui')
  
  class Main(QMainWindow, Ui_MainWindow):
      def __init__(self, ):
          super(Main, self).__init__()
          self.setupUi(self)
  
  if __name__ == '__main__':
      app = QtGui.QApplication(sys.argv)
      main = Main()
      main.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p>and this is its ui, "try.ui":</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;ui version="4.0"&gt;
   &lt;class&gt;Form&lt;/class&gt;
   &lt;widget class="QWidget" name="Form"&gt;
    &lt;property name="geometry"&gt;
     &lt;rect&gt;
      &lt;x&gt;0&lt;/x&gt;
      &lt;y&gt;0&lt;/y&gt;
      &lt;width&gt;211&lt;/width&gt;
      &lt;height&gt;157&lt;/height&gt;
     &lt;/rect&gt;
    &lt;/property&gt;
    &lt;property name="windowTitle"&gt;
     &lt;string&gt;Form&lt;/string&gt;
    &lt;/property&gt;
    &lt;widget class="QPushButton" name="pushButton"&gt;
     &lt;property name="geometry"&gt;
      &lt;rect&gt;
       &lt;x&gt;60&lt;/x&gt;
       &lt;y&gt;60&lt;/y&gt;
       &lt;width&gt;75&lt;/width&gt;
       &lt;height&gt;23&lt;/height&gt;
      &lt;/rect&gt;
     &lt;/property&gt;
     &lt;property name="text"&gt;
      &lt;string&gt;PushButton&lt;/string&gt;
     &lt;/property&gt;
    &lt;/widget&gt;
   &lt;/widget&gt;
   &lt;resources/&gt;
   &lt;connections/&gt;
  &lt;/ui&gt;
  </code></pre>
  
  <p>Edit: <a href="http://i.stack.imgur.com/qCL0V.png" rel="noreferrer">Here</a> is how default icon looks like on the taskbar. I just do not want it there, as expected from a widget.</p>