I have QTreeWidget containing 5 columns. I want to remove column from the tree when user uses remove column menu. How can I remove column from the tree?
Hi ! Did you try void QTreeWidget::removeItemWidget( QTreeWidgetItem *item, int column) ?
– Martin
when it comes to 'complex' data manipulation - than just displaying - i prefer the model/view aspect because it gives you more controll of what is going on. sadly i never implemented something similar
– Zaiborg
@Zaiborg already i had reimplemented QTreeWidget as per your suggestion it will be difficult to change
– DigviJay Patil
1 Answers
3
votes
If it's purely for UI purposes you can hide the corresponding section in the QHeaderView used by your tree view:
treeview->header()->hideSection(4)
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
void QTreeWidget::removeItemWidget( QTreeWidgetItem *item, int column)
? – Martin