Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QML ReferenceError: Can't find variable
bkamps last edited by
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))