2
votes

I have QTreeWidget like this

enter image description here

What should i do to get value from selected row and filename column ?

I have current selected item

 item = self.ui.files_treewidget.currentItem()

but how to access to specific cell?

1

1 Answers

3
votes

You can use QTreeWidgetItem.text(column), where column is an integer. In your example you would do:

item = self.ui.files_treewidget.currentItem()
filename = item.text(0)
size = item.text(1)