[Qt-interest] QSortFilerProxyModel and custom tree-like model with lazy population of data
Taras Kopets
tkopets at gmail.com
Wed May 27 10:14:01 CEST 2009
Hi list,
When I create QSortFilerProxyModel over my custom tree model (lazily
populated), it starts to fetch childs of nodes, when I don't need them (when
I expand level 1 of tree nodes, it fetches level 2 and 3), which leads to
very time consuming operations (each node gets data from DB, there can be
around 800 nodes, so I get 800+1 queries executed at a single click of
mouse!). I suppose QSortFilerProxyModel uses rowCount() somewhere insted of
hasChildren()...
The whole benefit from implementing lazy population of model is just wasted
with attaching QSortFilerProxyModel to original model...
Is there any way to avoid this?
Best Regards,
Taras Kopets
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090527/9ef86aef/attachment.html
More information about the Qt-interest-old
mailing list