[SOLVED] Multiple item delegates in QTreeWidget
General and Desktop
3
Posts
2
Posters
2.2k
Views
1
Watching
-
Hello everyone,
I was wondering, whether it is possible to have multiple item delegate types, like for one column a QComboBox and for the other one QSpinBox?
Well if it's not, no big deal, I have already added a QComboBox widget to one of the columns, it just would be nicer to have an editor pop up on double click.
Kind Regards
Raivis -
you can use QAbstractItemView::setItemDelegateForColumn()
But for this purpose 1 delegate should be also fine. Just create your editor widget depending on the column index.