On 09/26/2014 09:33 AM, William Hallatt wrote:
> Hi everyone,
>
> I have just started playing with Qt’s MVC classes and have created a
> hierarchical model to display in a QTreeView. Some of the nodes, however, 
> have a
> fair amount of children and when I expand these nodes (or, heaven forbid,
> expandAll), the app hangs for a remarkably long time.
>
> I have read everything I can on lazy model loading and have implemented what I
> believe to be correct fetchMore and canFetchMore methods, yet this does not 
> seem
> to make a difference since fetchMore only gets called once on an expand
> (however, the tree expands to the correct level and to the very last child 
> which
> I find very confusing).
>
> So, my questions are:
>
> 1. Does lazy model loading actually affect the expansion of nodes?
> 2. Is there a way I could improve the performance?
>
> I have been banging my head against this for two days now so any help will be
> appreciated.
>

Are you running with a debug or release build of Qt.

What does a profiler show.

> The code for my item and model classes is available here:
>
> https://www.dropbox.com/sh/8vc1s29wvmvpp07/AAChJVKhjUuXJy9dxjlT6ErRa?dl=0
>
> Thanks!
>
>
>
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to