I am trying to grab the string/object from the treeview. So when a user click on any item in the treeview, I can show it on the terminal. ANy help is appreciated.Here is the code.
QtCore.QObject.connect(self.treeWidget, QtCore.SIGNAL("clicked(QModelIndex)"), self.treefunction)
def treefunction(self, index):
print index
Output on clicking the item in treeview is:
<PyQt4.QtCore.QModelIndex object at 0x8835a74>
Instead of the actual string.