Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.7.1, 5.8.0 RC
-
None
-
windows 10 64bit
qt 5.8 beta 32bit
Description
import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 import QtGraphicalEffects 1.0 ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") ColumnLayout { anchors.fill: parent ListView { anchors.fill: parent model: ListModel { id: listmodel } Component.onCompleted: { listmodel.append({ text: "Image 1", image: { value: "picture.png1", imageType: 1 }, position: 1 }); listmodel.append({ text: "Image 2", image: { value: "picture.png2", imageType: 1 }, position: 2 }); listmodel.append({ text: "Image 1", image: { value: "picture.png3", imageType: 1 }, position: 3 }); } delegate: Item { width: parent.width height: 50 RowLayout { anchors.fill: parent Text { text: model.text } Text { text: model.image.value } } } } Button { text: "test" onClicked: { var m = listmodel.get(0) m.text = "aaaa" // change in model m.image.value = "zzzz" // not change! right? var image = m.image image.value = "ddd" // not change m.image = image // change in model var test = { a: { b: "c" } } test.a.b = "e" // its change! console.log( test.a.b ) test.a.b = "d" console.log( test.a.b ) } } } }
"m.image.value" does not change when button is clicked.
Attachments
Issue Links
- duplicates
-
QTBUG-21844 Support bindable JavaScript objects
- Open