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

william.crocker at analog.com william.crocker at analog.com
Wed Feb 3 15:11:48 CET 2010



Jugdish wrote:
> I should note that it only does this when my view derives from 
> QTreeView. When it derives from QTableView, it only requests the index 
> for items in the viewport. So something about QTreeView is causing it 
> to traverse the first column all the way to the bottom row.
>


Follow the code execution in a debugger and see what it is doing.


> On Wed, Feb 3, 2010 at 2:02 PM, Jugdish <jugdizh at gmail.com 
> <mailto:jugdizh at gmail.com>> wrote:
>
>     Hmmm, even after enabling uniformRowHeights on the view, it still
>     does the same thing. To clarify, it looks like the view is not
>     actually requesting *every* model index; this is what it does:
>
>     1. get index for all columns of row 0
>     2. get index for all rows of column 0
>     3. get index for all rows/columns currently visible in the viewport
>
>     So if I can find out how to stop it from doing step 2 I'd be happy.
>
>
>     On Wed, Feb 3, 2010 at 1:50 PM, Andre Somers
>     <andre at familiesomers.nl <mailto:andre at familiesomers.nl>> wrote:
>
>         That may have to do with not setting the uniformRowHeights
>         property. If
>         not set, the view needs to query each item to see how much
>         space is
>         needed, and how long the scrollbar needs to become.
>
>         André
>
>         _______________________________________________
>         Qt-interest mailing list
>         Qt-interest at trolltech.com <mailto:Qt-interest at trolltech.com>
>         http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>   



More information about the Qt-interest-old mailing list