title: how to use ImageQt
body: <p>I would like to use ImageQT so I can do image manipulation with the Python Image Library (PIL) and render the result using Qt4.  I have a short test routine that reads the using PIL.Image.open, converts it using ImageQT and opens a dialog using QT.  If I just use Qt to read the image, it works.  What am I missing?</p>
  
  <pre><code>#!/usr/bin/python3.3
  import sys
  from PIL import Image
  from PIL.ImageQt import ImageQt
  from PyQt4 import QtGui, QtCore
  from PyQt4.QtGui import QImage
  
  app = QtGui.QApplication(sys.argv)
  # added initialization after first suggestion below
  QtGui.QImageReader.supportedImageFormats()
  
  im = Image.open('test.gif')
  image = ImageQt(im)
  pixmap = QtGui.QPixmap(image)
  # pixmap = QtGui.QPixmap('test.gif')
  
  widget = QtGui.QWidget()
  hbox = QtGui.QHBoxLayout(widget)
  lbl = QtGui.QLabel(widget)
  lbl.setPixmap(pixmap)
  hbox.addWidget(lbl)
  widget.setLayout(hbox)
  widget.show()        
  sys.exit(app.exec_())
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/IKFWu.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IKFWu.gif" alt="test.gif"></a><br>
  <sub>(source: <a href="http://www.sonic.net/~sjs/test.gif" rel="nofollow noreferrer">sjs at www.sonic.net</a>)</sub>  </p>
  
  <p>Note: added additional QtGui initialization after first suggestion. result is still same.</p>