ItemDelegate show icons in column 0.
Is it possible for QTreeView, in parent index with column==0 to show - text, for child indexes - delegated icons.
ItemDelegate show icons in column 0.
Is it possible for QTreeView, in parent index with column==0 to show - text, for child indexes - delegated icons.
As far as I understand what you mean - yes and you don't need a custom delegate for it, the default will do just fine provided that the model returns proper data for proper roles. It would be advised to explain what you mean though as I might have misunderstood you.
tree has structure:
-date
---info icons, other columns.
Not problem to use DecorationRole to show one icon. But need to show few images
Solved, in paint for delegate analysing is parent == QModelIndex(). If so - drawText, in other case - drawing pictures.
Bookmarks