QTreeView - How to show custom widgets on the tree?
Unsolved
General and Desktop
-
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 ?
-
@kumararajas said:
QTreeView
void QAbstractItemView::setIndexWidget(const QModelIndex & index, QWidget * widget)
QWidget * QAbstractItemView ::indexWidget(const QModelIndex & index) const