Tree Element - no longer puts an entry for the Root node (mimics tkinter)

This commit is contained in:
MikeTheWatchGuy 2019-01-11 10:39:46 -05:00
parent 29eb1fe47b
commit 9ca72f32ed
1 changed files with 15 additions and 12 deletions

View File

@ -5393,9 +5393,12 @@ def PackFormIntoFrame(window, containing_frame, toplevel_win):
# treeview.column(heading, width=width * CharWidthInPixels(), anchor=anchor)
def add_treeview_data(node, widget):
# print(f'Inserting {node.key} under parent {node.parent}')
if node != element.TreeData.root_node:
child = QTreeWidgetItem(widget)
if node.key != '':
child.setText(0, str(node.text))
else:
child = widget
# if node.key != '':
# child.setData(0,0,node.values)
if type(node.icon) is bytes:
ba = QtCore.QByteArray.fromBase64(node.icon)