PDA

View Full Version : Lazy population of QAbstractModel



bastien
6th December 2008, 01:44
I want to build a tree using a lazy method (each node will be retrieved using a slow db), how can I do that using QAbstractItemModel.
Each node is uniquely identified by a String, that could be build from the parent string. I found a solution based on a QSet, each time I add an item I will add the unique string to the QSet and point the internalpointer of item to it but it is ugly and cleaning is not automagic. Do you have some idea or pointer

Perhaps a proxymodel?

jpn
16th January 2009, 20:25
See Lazy Population of Model Data.