Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How do I create multiple Dynamic Objects that have some kind of indexed id?
AI_Messiah last edited by
So what I want to do is create enemy space ships in an index based way so that I can destroy one of them and when I try to access properties I am not dealing with things that no longer exist.
Simply use a QList<QObject*> or QVariantList, depending on your space ship backend implementation.
If you want a QML-only solution, for some reason - you can parent all your space ships under a single
Itemand then access them using