title: QPainter::begin: Paint device returned engine == 0, type: 0
body: <p>I started watching some tutorials for Python and QT (<a href="https://www.youtube.com/watch?v=Eq7__6y0jwo&amp;index=3&amp;list=PL19DCiIwVefyQxlDTWlXQ4lnZDPW6_r-q" rel="nofollow">https://www.youtube.com/watch?v=Eq7__6y0jwo&amp;index=3&amp;list=PL19DCiIwVefyQxlDTWlXQ4lnZDPW6_r-q</a>) but I'm getting this error "QPainter::begin: Paint device returned engine == 0, type: 0" and I can't figure out why. The idea is that I want to have a window that works in 3dsMax, Modo and maybe as a standalone (Both 3dsMax and Modo come with PySide).</p>
  
  <p>Any ideas?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>from PySide import QtCore, QtGui
  import sys
  
  class PaletteListModel (QtCore.QAbstractListModel):
      def __init__(self, colors=[], parent=None):
          QtCore.QAbstractListModel.__init__(self, parent)
          self._colors = colors
  
  
  if __name__ == '__main__':
      app = QtGui.QApplication(sys.argv)
  
      listView = QtGui.QListView()
      listView.show()
  
      red = QtGui.QColor(255, 0, 0)
      green = QtGui.QColor(0, 255, 0)
      blue = QtGui.QColor(0, 0, 255)
  
      model = PaletteListModel([red, green, blue])
  
      listView.setModel(model)
  
      sys.exit(app.exec_())
  </code></pre>
  
  <p>Thanks,</p>
  
  <p>Nick</p>