def createEditor(self, parent, option, index): # special combobox for field type if index.column() == 1: cbo = QComboBox(parent) cbo.setEditable(True) cbo.setAutoCompletion(True) cbo.setFrame(False) for item in self.fieldTypes: cbo.addItem(item) return cbo return QItemDelegate.createEditor(self, parent, option, index)