[PyQt] [BUG] QQmlComponent.create() marks item owner as C++ and they never garbage collected

Vladimir Rutsky rutsky.vladimir at gmail.com
Thu Jun 4 15:28:39 BST 2015


Hello,

QQuickItem's objects created with QQmlComponent.create() are owned by
C++, so when Python variable is being garbage collected item is not
destroyed.

As workaroud I can manually call "sip.transferback(item)" for item -
after this item is properly garbage collected.

I prepared complete example to reproduce this bug:
https://gist.github.com/rutsky/31f6cfb15c6aa474317a

Regards,

Vladimir Rutsky


More information about the PyQt mailing list