Now going through your original way,
1. Registering the Game.
2. Embed Game in Component [qt-project.org].
3. Create the Game object dynamically using createObject [qt-project.org]
4. Then store that object in an array . For eg.
Component {
id: component
Game {}
}
property var gameArray: []
var obj = component.createObject(myGame)
gameArray.push(obj)
5. Then access it,
var obj = array[gameArray]
console.log(obj.color)
↧