mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #62] Support for ObservableCollection<> #34
Labels
No labels
bug
enhancement
help wanted
help wanted
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/qmlnet#34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pauldotknopf on GitHub (Aug 19, 2018).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/62
You can set the
Repeater.modelproperty with an array, but it doesn't auto-update when the collection changes. You have to reset the property with the same value.Repeater.modelwill internally check if the type being set is aQQmlInstanceModel, and if it is, it will auto-update itself when signals are raised on the model.We should create derived type implementing
QQmlInstanceModelthat carries a .NETObservableCollection<>instance. And events raised on the .NET collection will raise the signals on theQQmlInstanceModel. This will allow us to bind lists toRepeaterandListViewQML components and have them automatically update/render when items are added/removed/updated.