Does anyone have any advice on how to dynamically load and delete entire QMLViews? I have a set of QML UI screens that I am trying to switch between but am not sure how to do so.
I can't delete the current QMLView from the associated scripts attached to buttons or other UI elements because it is destroying the object hierarchy right out from under the script resulting in a crash, obviously.
Do I need to have some sort of C++ thread running that accepts messages from the QML objects and scripts to queue up QMLView swaps? Or is there a simpler way to have the following work:
UI_1.qml
UI_2.qml
Load UI_1.qml into a QMLView with a button that needs to trigger deleting UI_1.qml's view and load UI_2.qml to replace it.