April 2018
Beginner
714 pages
18h 21m
English
First, we created a property called rods that will hold an array of created Rod objects. Next, we used the Component.onCompleted attached property to run some JavaScript code after the QML engine instantiates our root object. Our first action was to load the Rod component and check whether it was loaded successfully. After obtaining a functioning component object, we used its createObject() method to create three new rods. We used the arguments of this function to pass the root object and value of the index property. Finally, we pushed the Rod object into the array.
Read now
Unlock full access