Sounds perfectly normal :)

The node you return from updatePaintNode is the visual representation of that 
given item, excluding that item's children. Returning null for it will remove 
that item from the scene (and you should delete the node since the SG no longer 
holds a reference to it or any of its children), but does not affect that 
item's children. As the scene graph is a tree, removing the paint node will of 
course remove any child nodes of the removed paint node also.

The child items of a QQuickItem can be thought of as siblings to its paint node 
and their visibility can be controlled via QQuickItem::setVisible() or through 
their own updatePaintNode calls. 

cheers,
Gunnar

> On 11 May 2016, at 11:42, Данил Патрушев <danni...@gmail.com> wrote:
> 
> Hi all. I have a quick item which does some custom drawing and has a few 
> visible child items. At some point I want to erase all the stuff drawn by 
> this item, which I thought I could by returning a null qsgnode from 
> updatePaintNode, but the stuff remains visible. I have a few ideas how to 
> work around this, but I just wonder if this is considered normal behavior.
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

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

Reply via email to