Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.0
-
None
-
3b58b103bfa2e2b9bb12a042cbba36fb0a1baf9f
Description
I have a lazily populated model. At some point of time the "background process" determines that a given item without previous children now has one and I want to communicate that to the view so it can draw the [+] to allow the user to request expanding that item. I use beginInsertRows() and endInsertRows() to add the children to the item, and it all works well except that the view does not update (i.e. 'add') the [+] marker. Emitting "dataChanged()" on various scales does not help. Emitting "layoutChanged()" does "help" (i.e. gives the [+] in the end) but also triggers all kind of extra stuff (most notably other calls to "readMore()").
It would be nice to have a way to tell the view that it's idea of the number of children a certain item has should change.