Here's my code:
selected = None
self.treeWidget_iRulesList.clear()
self.treeWidget_iRulesList.setColumnCount(1)
self.treeWidget_iRulesList.setHeaderLabels(["Rules"])
self.treeWidget_iRulesList.setItemsExpandable(True)
for item in allrules.keys():
#print item
hdr = QTreeWidgetItem(item)
self.treeWidget_iRulesList.addTopLevelItem(hdr)
self.treeWidget_iRulesList.expandItem(hdr)
for x in allrules[item]:
#print x
rule = QTreeWidgetItem(hdr, x)
self.treeWidget_iRulesList.addTopLevelItem(rule)
If I uncomment my print statements, each string is printed as expected, but in
the QTreeWidget, I only get the first character:
-g
----g
----t
----t
-l
----h
----u
----_
And so on. Any ideas? Thanks in advance.
Jason
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt