Fix: SelectionEditorFactory::setEditorData incorrectly used default DisplayRole with index.data() while it should use the EditRole.

This commit is contained in:
eelke 2018-12-16 09:39:43 +01:00
parent 387c664284
commit 56cbeea183

View file

@ -29,7 +29,7 @@ void SelectionEditorFactory::setEditorData(QWidget *editor, const QModelIndex &i
{ {
QComboBox *cmbbx = dynamic_cast<QComboBox*>(editor); QComboBox *cmbbx = dynamic_cast<QComboBox*>(editor);
if (cmbbx) { if (cmbbx) {
auto data = index.data(); auto data = index.data(Qt::EditRole);
auto list_model = cmbbx->model(); auto list_model = cmbbx->model();
QModelIndexList indexes = list_model->match( QModelIndexList indexes = list_model->match(