title: How to set a Python Qt4 window icon?
body: <p>I tried to use one icon from:</p>
  
  <ol>
  <li><a href="https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html" rel="nofollow noreferrer">https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html</a></li>
  <li><a href="https://stackoverflow.com/questions/12432637/pyqt4-set-windows-taskbar-icon">PyQt4 set windows taskbar icon</a></li>
  </ol>
  
  <p>But it does not show up on the window:</p>
  
  <p><a href="https://i.stack.imgur.com/GwnAm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GwnAm.png" alt="enter image description here"></a></p>
  
  <pre><code>#! /usr/bin/env python
  # -*- coding: utf-8 -*-
  #
  import sys
  from PyQt4.QtGui import *
  
  # Create an PyQT4 application object.
  a = QApplication(sys.argv)
  
  # The QWidget widget is the base class of all user interface objects in PyQt4.
  w = QWidget()
  
  # Set window size.
  w.resize(820, 240)
  
  # Set window title
  w.setWindowTitle("Hello World!")
  
  # https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
  undoicon = QIcon.fromTheme("camera-web")
  w.setWindowIcon(undoicon)
  
  # Show window
  w.show()
  
  sys.exit(a.exec_())
  </code></pre>
  
  <p>I am on Windows 10 with:</p>
  
  <ol>
  <li>Anaconda <code>conda --version</code> -> <code>conda 4.3.18</code></li>
  <li>Python <code>python --version</code> -> <code>Python 2.7.13 :: Anaconda custom (32-bit)</code></li>
  </ol>