On Mittwoch, 12. September 2018 09:40:08 CEST Igor Mironchik wrote:
> Hello.
> 
> Let's say I have C++ code to draw to QPixmap with QPainter.
> 
> This code returns data:image/png;base64,... string that can be used in QML.
> 
> But when I invoke this method from QML I've got
> 
> QPainter::begin: Paint device returned engine == 0, type: 2
> 
> So my question is how can I draw with QPainter in back-end from QML?

I'm not sure what you would like to do.

Do you only show the image in the UI? Then QQuickPaintedItem is probably what 
you would like to use.
For providing images from C++ I write a QQuickImageProvider.

But from your error message I'd check if your paint device (QPixmap) is empty.



_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to