[Qt-interest] Model/View delayed loading for large datasets

Jugdish jugdizh at gmail.com
Thu Feb 4 11:18:41 CET 2010


Stepped through this with a debugger and found the culprit:
QTreeView::doItemsLayout() which calls QTreeViewPrivate::layout(int) has
this block of code:

for (int j = first; j < first + count; ++j) {
    current = model->index(j - first, firstColumn, parent);
    if (isRowHidden(current.sibling(current.row(), 0))) {
        ++hidden;
        last = j - hidden + children;
    } else {
        ...
    }
}

So it's iterating over every row of the first column, checking if the row is
marked as hidden. I don't really see anyway to avoid this being called
unless I want to completely override the layout the management of QTreeView,
which would be a pain.

On Wed, Feb 3, 2010 at 2:11 PM, william.crocker at analog.com <
william.crocker at analog.com> wrote:

>
> Follow the code execution in a debugger and see what it is doing.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100204/fdfcab6e/attachment.html 


More information about the Qt-interest-old mailing list