[Interest] QML: Property 'update' of object QPaintedTextureImage is not a function

Federico Ferri federico.ferri.it at gmail.com
Fri Feb 1 11:30:35 CET 2019

I’m sorry for the duplicate post.

I did a further test: creating a QTimer in the QPaintedTextureImage’s
subclass ctor, so I don’t have the "TypeError: Property 'update' of object
QPaintedTextureImage is not a function” error.
However, now the program crashes in QPainter::drawImage, with this message
in console:

2019-02-01 11:15:45.754907+0100 Qt3DOpenCV[55788:4839633] QPaintDevice:
Cannot destroy paint device that is being painted

If anyone is interested in trying this, I created a repository with
complete testcase (the QML timer is commented out, and the Timer is created
in C++) at https://github.com/fferri/Qt3DOpenCV-test

On 31 January 2019 at 23:50:40, Federico Ferri (federico.ferri.it at gmail.com)


I’m trying to display a stream of images from a capture device in Qt3D (via
a texture).

So I subclassed QPaintedTextureImage overriding paint().

According to documentation of QPaintedTextureImage, each time update() is
called, the paint() function is invoked and the resulting image is

I’m trying to do so from QML (i.e. I have a Timer { onTriggered:
myTexImage.update() }) but I get the error:

2019-01-31 22:48:54.865282+0100 Qt3DOpenCV[50001:4569220]
qrc:/MyScene.qml:57: TypeError: Property 'update' of object
Qt3DRender::QPaintedTextureImage(0x106ef6bf0) is not a function

How shall the update() method be invoked?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190201/8aa63696/attachment.html>

More information about the Interest mailing list