QTreeView - How to show custom widgets on the tree?
Unsolved
General and Desktop
-
wrote on 16 Feb 2016, 14:27 last edited by
Hello,
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.
Any examples?
Thanks,
Kumara -
Hi,
Should this widget be shown on special circumstances or all the time ?
-
wrote on 18 Feb 2016, 11:56 last edited by
@SGaist This custom widget to be shown only on special situations, as you mentioned. And also on specific branches. Not always, not everywhere.
-
wrote on 18 Feb 2016, 17:51 last edited by alex_malyu
@kumararajas said:
QTreeView
void QAbstractItemView::setIndexWidget(const QModelIndex & index, QWidget * widget)
QWidget * QAbstractItemView ::indexWidget(const QModelIndex & index) const
3/4