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

QItemDelegate: and QTreeView

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.0
    • 4.2.2
    • Widgets: Itemviews
    • 3f8c4ae047428d21303cc5e12880838236138616

    Description

      If you want to set a delegate for a particular node in a QTreeView there seems to be no way to achieve this.

      itemDelegateForRow doesn't help since it will match for all levels of the hierarchy

      E.g.

      setItemDelegateForRow(1, new Delegate(this));

      A
      a1
      a2 = > This is the one I want the delegate for.
      a3
      a4
      B => This one will also get the same delegate
      C
      c1
      c2 => This one will also get the same delegate
      D

      The best thing would be:

      virtual QItemDelegate *itemDelegate(const QModelIndex &index) const

      but maybe something else (that is binary compatible) can be thought out.

      Attachments

        Issue Links

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

          Activity

            People

              vhilshei Volker Hilsheimer
              rve Anders Bakken
              Votes:
              2 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes