12-18-2012 08:59 AM
I'm using setContextProperty to inject a C++ object into my QML:
MyObject myObject = new MyObject();
QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(th
This is working absolutely fine, and the QML binds properly to the MyObject class instance.
My question is, what happens if I later call setContextProperty, with a differnet MyObject instance?
MyObject myObject2 = new MyObject();
What happens to the existing QML bindings? Do they get automatically updated, or does the 2nd call to setContextProperty have no effect?
12-18-2012 12:40 PM
12-18-2012 04:20 PM
thanks for the confirmation -
I solved the problem by exposing a MyObject * property from my main application instance - which can then change when needed and emits all the appropriate signals