0

I try to remove an item in a QTreeWidget. How can I remove it ? I just want to remove it, not to delete it and I don't find any method.

federem
  • 299
  • 1
  • 6
  • 17

3 Answers3

1

You can try with takeTopLevelItem() API, It only removes the item.

Ashif
  • 1,652
  • 14
  • 30
0

You can use QTreeWidgetItem::setHidden on the item you want to hide.

Exa
  • 4,020
  • 7
  • 43
  • 60
0

if have the item QTreeWidgetItem call setHidden(bool) you can get the titem by calling topLevelItem(int index) from the tree widget

WoJo
  • 360
  • 2
  • 10