In a QTreeView if the user was editing previousIndex and hit TAB an editor is opened for currentIndex, the default behaviour is to open a blank textedit so that if the user immediately hits TAB again the cursor moves to nextIndex and the model received a setData(currentIndex, QVariant() ) with an empty QVariant as data.
Is it possible to alter this behaviour so that by hitting TAB the user opens an editor but the already existing data remains there, so that the user needs to explicitly delete it?
I imagine that I can accomplish this by using
void QAbstractItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
But I'm not sure where to put the call to it.