Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.13.2, 5.15.2, 6.2.0
Description
We can't create a binding to C++ QJSValue using either the Binding component or Qt.binding() function in QML.
import QtQuick 2.12 import QtQuick.Window 2.12 import MyModule 1.0 Window { id: window width: 640 height: 480 visible: true title: qsTr("Hello World") MyObject { id: object jsValue: "not working" // but binding syntax works stringValue: "not working" } Column { anchors.centerIn: parent Text { text: "Binding QJSValue:\t" + object.jsValue } Text { text: "Binding QString:\t" + object.stringValue } } Binding { target: object; property: "jsValue"; value: "works" } // does not work Binding { target: object; property: "stringValue"; value: "works" } } The attachment contains a minimum reproduce example.