QTreeView - How to show custom widgets on the tree?
What should I do, if I want to show my own widget in place of tree item text in the QTreeView.
Example - I want to show a push button in place of text show in the tree item.
I visualize this as a QItemDelegate.
But, not having a good grip on that.
Should this widget be shown on special circumstances or all the time ?
@SGaist This custom widget to be shown only on special situations, as you mentioned. And also on specific branches. Not always, not everywhere.
void QAbstractItemView::setIndexWidget(const QModelIndex & index, QWidget * widget)
QWidget * QAbstractItemView ::indexWidget(const QModelIndex & index) const