title: QQuickImageProvider PyQt5
body: <p>I try to use <strong>QQuickImageProvider</strong> send QImage to QML, everything work well in c++ Qt5.9.2,but I try similar code with PyQt5(5.9.2), QML just says error:<b>ImageProvider supports Image type but has not implemented requestImage()</b>,but in fact,I implemented the <strong>requestImage()</strong>,here my code:</p>
  
  <p><strong>main.py:</strong></p>
  
  <pre><code>from PyQt5.QtCore import *
  from PyQt5.QtGui import *
  from PyQt5.QtQml import *
  from PyQt5.QtQuick import *
  
  class MyImageProvider(QQuickImageProvider):
      def __init__(self):
          super(MyImageProvider, self).__init__(QQuickImageProvider.Image) 
  
      def requestImage(self, p_str, size):
          img = QImage(300, 300, QImage.Format_RGBA8888)
          img.fill(Qt.red)
          return img, img.size()
  
  app = QGuiApplication([])    
  
  viewer = QQuickView()
  viewer.engine().addImageProvider("myprovider", MyImageProvider())
  viewer.setResizeMode(QQuickView.SizeRootObjectToView)
  viewer.setSource(QUrl("example.qml"))
  viewer.show()
  
  app.exec()
  </code></pre>
  
  <p><strong>example.qml:</strong></p>
  
  <pre><code>import QtQuick 2.7
  
  Item {
      id: root
      width: 800
      height: 600
      Image{
           // width: 300
           // height: 300
           source: "image://myprovider/test.png"
      }
  }
  </code></pre>
  
  <p>Perhaps <strong>requestImage()</strong> has different parameters and return values in python and c++,I'm sure that's right in format. refer to some examples, <a href="http://nullege.com/codes/search/PyQt5.QtQuick.QQuickImageProvider" rel="nofollow noreferrer">http://nullege.com/codes/search/PyQt5.QtQuick.QQuickImageProvider</a>, I don't know what's wrong with me. </p>