Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-66095

Make QTreeView::indexRowSizeHint virtual

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.10.0, 5.9.4
    • Widgets: Itemviews

    Description

      QTreeView::indexRowSizeHint() is quite slow for trees with lots of columns, since it calls itemDelegate(index).sizeHint() for every index in the row.  The return value from indexRowSizeHint() is cached in QTreeViewPrivate::itemHeight(), but the initial call to indexRowSizeHint() can cause a noticeable delay when scrolling to uncached rows.  If this method were virtual, it would be possible to use subclass-specific implementations that could be much, much faster.

      We're using PyQt to implement a tree view that typically has hundreds of columns.  We've already reimplemented drawRow() to speed up painting and data fetching, and we were able to get an additional ~20% frame rate improvement when scrolling to rows with uncached heights by reimplementing indexRowSizeHint().

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            kevkeating Kevin Keating
            Votes:
            9 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes