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

Please make QAbstractItemView::itemDelegate(index) virtual

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P5: Not important
    • None
    • 5.7.0
    • Widgets: Itemviews

    Description

      I need to control what item delegates are used for specific indexes.

      But trying to control that using setItemDelegateForRow() / setItemDelegateForColumn() does not work well enough.

      Especially the row-based delegate selection does not work well for tree based views, or in combination with a sort/filter model proxy.

      By allowing me to override QAbstractItemView::itemDelegate(index), I can implement the logic needed to select the proper item delegate.

      My current workaround is to create a "proxy" delegate which overrides the entire delegate interface and passes the method calls on to the real delegates, based on the model index. This feels really ugly.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-56793
          # Subject Branch Project Status CR V

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              antrag Anton Ragnarsson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes