You can try with takeTopLevelItem() API, It only removes the item.
Remove an item of a tree in Qt
-
25-06-2022 - |
Pergunta
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.
Solução
Outras dicas
You can use QTreeWidgetItem::setHidden on the item you want to hide.
if have the item QTreeWidgetItem
call setHidden(bool)
you can get the titem by calling topLevelItem(int index)
from the tree widget
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow