I created a class Publisher which periodically emits a QImage object.
However I\'m having a tough time drawing the QImage to
Use QQuickItem. There is a Qt example that does this.
C:\Qt\Examples\Qt-5.14.1\quick\scenegraph\threadedanimation
You make a class derived from QQuickItem and register it with qmlRegisterType. Provide the override function 'updatePaintNode' in your class. In the example, the class is 'Spinner'
In updatePaintNode:
Create a node class derived from QObject and QSGTransformNode
In the node class constructor:
Convert your Qimage to an QSGTexture with createTextureFromImage.
Create QSGSimpleTextureNode, set QSGTexture using setTexture
appendChildNode with QSGSimpleTextureNode
In QML add
import Spinner 1.0
and
Spinner {
anchors.centerIn: parent
anchors.horizontalCenterOffset: 80
spinning: true
}