title: PyQt - Set QLabel image from URL
body: <p>I've been trying to set an image to a QLabel from a URL. But im having no luck. 
  Here is how im trying to do it right now:</p>
  
  <pre><code>import urllib, cStringIO
  img_file = cStringIO.StringIO(urllib.urlopen(image_url).read())
  image_file = Image.open(img_file)
  </code></pre>
  
  <p>Then setting this to a QImage:</p>
  
  <pre><code>final_image = QImage(image_file)
  
  self.emit(SIGNAL("finished(QImage)"),
      final_image
  )
  </code></pre>
  
  <p>The image is getting passed back from a thread to a method in the main GUI. </p>
  
  <pre><code>def set_image(self, final_image):
      self.main_picture_pixmap = QPixmap.fromImage(final_image).scaled(
          QSize(self.picture_label.size()), 
          Qt.KeepAspectRatio, 
          Qt.FastTransformation
      )
      self.picture_label.setPixmap(self.main_picture_pixmap)
  </code></pre>
  
  <p>Doing this I get the error:</p>
  
  <pre><code>QPixmap::scaled: Pixmap is a null pixmap
  </code></pre>
  
  <p>Is there anyway to fix this, or a different way to do this?</p>