I need to do some actions when item in QTreeWidget activates, but following code doestn't gives me expected result:
class MyWidget(QTreeWidget):
def __init__(self, parent=None):
super(MyWidget, self).__init__(parent)
self.connect(self, SIGNAL("activated(QModelIndex)"), self.editCell)
def editCell(self, index):
print index
or
class MyWidget(QTreeWidget):
def __init__(self, parent=None):
super(MyWidget, self).__init__(parent)
self.connect(self, SIGNAL("itemActivated(QTreeWidgetItem, int)"),
self.editCell)
def editCell(self, item, column=0):
print item
What am i doing wrong or how to hadnle item activation in the right way?
Thanks in advance, Serge