SelectionEditorFactory + ItemModel + ItemModelFactory combination is working

in new EditTableWidget

(EditTableWidget is very much WIP)
This commit is contained in:
eelke 2018-12-15 20:27:40 +01:00
parent e44f73166f
commit 742fd0a4d3
19 changed files with 419 additions and 80 deletions

View file

@ -134,19 +134,23 @@ QWidget *PgLabItemDelegate::createEditor(QWidget *parent, const QStyleOptionView
{
if (m_editorFactory)
return m_editorFactory->createEditor(parent, option, index);
return nullptr;
return QStyledItemDelegate::createEditor(parent, option, index);
}
void PgLabItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
{
if (m_editorFactory)
m_editorFactory->setEditorData(editor, index);
else
QStyledItemDelegate::setEditorData(editor, index);
}
void PgLabItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
{
if (m_editorFactory)
m_editorFactory->setModelData(editor, model, index);
else
QStyledItemDelegate::setModelData(editor, model, index);
}
AbstractEditorFactory* PgLabItemDelegate::editorFactory()