Qt 6.11 is out! See what's new in the release
blog
[SOLVED] Thread safety with deletion of dynamically created components
QML and Qt Quick
4
Posts
2
Posters
2.6k
Views
1
Watching
-
I have dynamically created QML components to read user input in various ways. I iterate through them in the main QML rectangle to query some changed properties. This is done with a javascript loop checking the children of the main container. I now want to allow the user to close (and destroy) these components by using a destroy() call when clicking on a close button inside them.
How can I ensure that this is safe and I'm not trying to access a component that is being destroyed while iterating through my loop in the main QML rectangle?
-
Thanks for your response. I can sleep at night :)