Reputation: 1830
I have some objects created in QML code with
Qt.createQmlObject (...)
How can I delete/remove these objects?
Upvotes: 7
Views: 12867
Reputation: 1177
Take a look at this article: Dynamic Object Management in QML and on this part especially:
Note that it is safe to call destroy() on an object within that object. Objects are not destroyed the instant destroy() is called, but are cleaned up sometime between the end of that script block and the next frame (unless you specified a non-zero delay).
Upvotes: 3