12-16-2013 02:49 AM
If I am using QML, I can load the document to c++, and then create the root context, and then set the scene.Now when I move from that screen to another screen(by calling
inside a separate function) what happens to the old scene? does it get removed from the memory?
now if i have to load the old scene back, do I have to load the qml doc again, and set the scene once more?
And also if the above is done by c++ in separate functions, Do i have to call each functions again and again for each time I show that screen?
12-16-2013 05:09 AM
Unless you changed the previous 'scenes' parent to something else then it will be deleted automatically on calling the setScene() funciton.
If you do want to keep it then before calling this function change the parent to something else. You will then be responsible for keeping track of the object yourself, deleting on exit or when no longer needed. If your intention is to have the user switch between th two at will then obviously you will need logic to keep track of which one will be auto deleted and which one you will need to delete yourself.
12-16-2013 06:24 AM