Details
-
Suggestion
-
Resolution: Fixed
-
P3: Somewhat important
-
4.2.2
-
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
- is duplicated by
-
QTBUG-56793 Please make QAbstractItemView::itemDelegate(index) virtual
- Reported