Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9.0
-
None
Description
Consider:
import QtQuick Window { visible: true ListView { id: view anchors.fill: parent model: [ {greeting: "Hello", amount: 1}, {greeting: "Goodbye", amount: 3}, {greeting: "Cheers", amount: 4} ] delegate: Row { required property QtObject model TextInput { text: model.greeting onEditingFinished: { model.greeting = text console.log(view.model[0].greeting) } } Text { text: ", World, " + model.greeting + ", " + model.amount + " times!" } } } }
This still outputs "Hello" even if you change the greeting in the first row via the TextInput. We do have an up to date QVariantList in QQmlListAccessor::d, but ListView does not expose it. Rather, it exposes its own copy of the list that it keeps in QQuickItemViewPrivate::modelVariant.
Note that fixing this also involves sending the relevant signals when changing model data.