PyQT QTreeWidget iterating
I have two columns in a QTreeWidget , one column represents a list of urls and the second represents results . I have loaded the list of urls in first column and now I want to iterate this list and during the iteration, change the text in the second column. How to achieve this? reclosedev You can call QTreeWidget.invisibleRootItem() to receive the root item, and then use the QTreeWidgetItem API to iterate through the items. Example: root = self.treeWidget.invisibleRootItem() child_count = root.childCount() for i in range(child_count): item = root.child(i) url = item.text(0) # text at first (0)