[Interest] Setting QQuickItem properties inside QQuickItem::UpdatePaintNode

manish sharma 83.manish at gmail.com
Thu Jun 5 06:45:13 CEST 2014


Hi,

Qt documentation says "The main thread is blocked while this function is
executed so it is safe to *read* values from the QQuickItem instance and
other objects in the main thread."

Can we only read QQuickItem properties? We can not set it? I have few
QQuickItems and I am trying to set QQuickItem properties (height/width)
from one of the QQuickItem's updatePaintNode function. So far it worked but
when I try QQuickWindow::grabWindow() it asserts both in windows
(QML_FORCE_THREADED_RENDERER=1) and Linux.


*ASSERT failure in QQuickItem::update(): "Function can only be called from
GUI thread or during QQuickItem::updatePaintNode()", file
E:\Qt\qt5.2\qt5\qtdeclarative\src\quick\scenegraph\qsgthreadedrenderloop.cpp,
line 988*
I noticed QSGThreadedRenderLoop::m_locked is false. Is it a bug in
QSGThreadedRenderLoop OR we can not set QQuickItem properties inside
updatePaintNode which might cause QQuickItem::update()?

Regards,
Manish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140605/063386fa/attachment.html>


More information about the Interest mailing list