QML ReferenceError: Can't find variable
In QML I have defined some object:
In C++ I have set the model using setRootContext. This all works.
Let's say in the configuration of the application there is an setting which causes the C++ myModel object not to be created and thus not binded to QML TestObject's model.
(Ofcourse) now i get the "ReferenceError: Can' find variable: myModel.
How to dynamicly set the model in QML?
if ((myModel != undefined) || (myModel != null))