Am I right to understand that means there is no way to dynamically update general variables (C++ variables which are not members of a QObject subclass) ? I’d have to set up something like a singleton class instead.
If you know when the variable’s value is going to change you can write a Q_INVOKABLE function which will return the new value and call this function from the QML. But can’t be termed as dynamic.
Yes to take the full advantage of Binding and stuff it’s better to create a class and set it as contextProperty as shown in the example.
↧








