@Override public void setEditorData(QWidget editor, QModelIndex index) { QComboBox comboBox = (QComboBox) editor; if (comboBox == null) return; int pos = comboBox.findText((String) index.model().data(index), Qt.MatchFlag.MatchExactly); comboBox.setCurrentIndex(pos); }