How to remove children of QTreeWidgetItem. Sometimes it removes all the items and sometimes it doesn't.
How to properly delete child items.
Here is my function performing removal of child items and adding new child items
def update_children_cont(self,subDirs,parent):
new_dir = subDirs
for i in range(parent.childCount()):
parent.removeChild(parent.child(i))
print "child count should be 0",parent.childCount()
parent.addChildren(self.tree_list_generator(new_dir))
in docs for QWidgetItem.removeChild
Removes the given item indicated by child. The removed item will not be deleted.
what does it mean by removed item will not be deleted