Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.6.0
-
None
Description
Bindings restored after performing setContextProperty on the root context object
STEPS TO RECREATE:
1) Create a new empty QtQuick project
2) In main.qml defines some properties (e.g. int, string, QtObject, ...) where the r-value must be a valid binding
3) In main.cpp retrieves the root context from the engine, and set an arbitrary context property (e.g. a string)
4) Retrieve the root object from the engine and try to set, with setProperty, the properties defined in 1, according to their types
5) Set another context property in the root context
EXPECTED VS ACTUAL:
EXPECTED: All new values set by cpp setProperty remains correctly set
ACTUAL: All values that were defined with a valid binding (or assigned to another valid binding, see attached code), are restored to the binding value