I have a QTreeWidgetItem
with two columns of data, is there any way to make only the second column editable? When I do the following:
QTreeWidge
I'm new to PySide and Python in general, but I was able to get this to work by registering with the QTreeWidget for itemClicked callbacks. Within the callback, check the column and only call 'editItem' if it's for a column you want to allow editing.
class Foo(QtGui.QMainWindow):
...
def itemClicked(self, item, column):
if column > 0:
self.qtree.editItem(item, column)
By not invoking editItem for column 0, the event is basically discarded.