[Interest] Do QQuickItems destory their children?

Alex Montgomery apmontgomery at gmail.com
Fri May 23 19:43:31 CEST 2014


I'm having an issue where closing a QML window stalls my application for 5+
seconds. I do have a lot of QQuickItems in the scene, but I was wondering
if this is expected behavior (i.e. destroying QQuickItems takes awhile) or
if there's something I can do to reduce this time.

I profiled my app and it's spending most of its time in the QQuickItem
destructor. I noticed this code in there:
// XXX todo - optimize
while (!d->childItems.isEmpty())

Am I correct that deleted QQuickItems orphan their children instead of
destroying them? I find that surprising, if that's the case. Should a
custom QQuickItem make sure to traverse its children and manually delete
them or are they automatically deleted somewhere that I missed?

Thanks for any help or guidance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140523/8c4d8958/attachment.html>

More information about the Interest mailing list