I created a class Publisher which periodically emits a QImage object.
However I\'m having a tough time drawing the QImage to
When I've had image-producing C++ classes I've wanted to embed in QML, I've always done it by making the C++ class a subclass of QDeclarativeItem (there'll be a new QtQuick 2.0 equivalent of course), overriding the paint method with the appropriate drawing code, which maybe as simple as
void MyItem::paint(QPainter* painter,const QStyleOptionGraphicsItem*,QWidget*) {
painter->drawImage(QPointF(0.0f,0.0f),_image);
}
if you have a QImage of the right size already... and Job Done. For animation, just ping update() when there's something new to draw.