I second Wysota. Most likely the problem is that model's data() does not return a QString for Qt::EditRole for an empty index. Therefore, when you start editing an empty cell, you'll get an editor for QVariant::Invalid which is the default editor, a QLineEdit (or QExpandingLineEdit to be exact). You can get past the problem by simply registering your custom editor for QVariant::Invalid too (if that's what you want):
factory
->registerEditor
(QVariant::String, lineEditorCreator
);
factory
->registerEditor
(QVariant::Invalid, lineEditorCreator
);
// <---
factory->registerEditor(QVariant::String, lineEditorCreator);
factory->registerEditor(QVariant::Invalid, lineEditorCreator); // <---
To copy to clipboard, switch view to plain text mode
Bookmarks