I am stumped. In the code below:
class LineEdit(QtGui.QLineEdit):
def __init__(self, value="", parent=None, commit=None):
super(LineEdit, self).__init__(parent=parent)
self.setText("blabla")
self.commit = commit
self.editingFinished.connect(self.on_change)
print self.text()
self.text() is "blabla" but the LineEdit does not show the text and after editing self.text() is "". The editor is created in a QStyledItemDelegate() with createEditor() for a QTreeView().
Can anyone explain to me why this happens and how to fix it?