[Qt-interest] Why QListView is so slow and QTableView is fast?
Sylvain Pointeau
sylvain.pointeau at gmail.com
Wed Aug 26 19:07:05 CEST 2009
Justin is right,I asked why QListView is so slow compared to the QTableView
and why QTableView is slow when we scroll to the last items?
Cheers,
Sylvain
On Wed, Aug 26, 2009 at 4:39 PM, Justin Noel <justin at ics.com> wrote:
> Kenneth Beck wrote:
> > Sylvain Pointeau wrote:
> >
> >> Hi,
> >>
> >> I am testing QListView for a large number of items (36'000)...
> >> it is so sloooow (I stopped the application, it never shows up) .
> >> (yes I set UniformItemSizes to true)
> >>
> >> I tried QTableView and it is immediate.
> >> However the scrolling become slow if we are viewing the last elements.
> >>
> >> Please can someone give me some insights?
> >>
> >> Cheers,
> >> Sylvain
> >>
> >>
> > I am having a very similar problem with a QTableView. Once the model is
> > filled and the user is just moving around the table, just moving from
> > one cell to the other, or moving the scroll bar, takes a lot of time.
> > Each call to the data() method requires a search into the model to find
> > the data, but the model only contains a few 10's of items, it is not
> > large. Does anyone know where to look for ways to speed this up? Are
> > there some optimization tricks?
> >
>
> I think the OP is asking the opposite question. How to make QListView
> perform as well as QTableView. QTableView in most cases is a lot
> faster. A huge improvement can be gotten by setting
> setUniformItemSizes(). Of course to use that you need to make sure all
> your items have the same row size.
>
> Good Luck!
> --Justin
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090826/1934f79b/attachment.html
More information about the Qt-interest-old
mailing list