I would recommend using QQuickPaintedItem. It'll probably take you less time to port your code. I've found QML canvas a bit hard to debug since it's all in javascript. It's really easy to miss spell an object's variable name and rendering won't work. I've also found it to be more buggy than a QQuickPaintedItem, although that was several years ago. Also, with QML canvas you loose the ability to print, convert it to a PDF, or high-resolution image.
In terms of performance, QQuickPainterItem will block both the rendering thread and the main thread when you draw to a QPainter. After looking at the source code for QML Canvas it pushes commands to the rendering thread and then uses those commands to control a QPainter to draw onto a texture (I think this is how it works). What I really wish is if QGraphicsScene was decoupled with QWidgets and allowed for it to run a sperate thread (no the GUI thread). Then you could have the power of QGraphicsScene with having it block the main thread and would allow it to render a texture in QML's scene graph. Phi|ip -- Phi|ip
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
