QML represents a separate ownership tree ( QObject) from the visual tree (QtQuick scene graph).
parent returns the visual parent.children returns visual child elements.datareturns child elements QObject.
But how do I access the parent element QObject?
FYI, I intend to dynamically create and destroy nested layouts containing a custom type, so I need to manage the tree QObject. Just using the visual tree will cause the “wrong” objects to disappear after the repair and then be deleted.
source
share