'Create editor widget'

def createEditor(self, parent, option, index):

    model = index.model()
    value = model.get_value(index)
    if (model._data.dtype.name == 'bool'):
        value = (not value)
        model.setData(index, to_qvariant(value))
        return
    elif (value is not np.ma.masked):
        editor = QLineEdit(parent)
        editor.setFont(get_font(font_size_delta=DEFAULT_SMALL_DELTA))
        editor.setAlignment(Qt.AlignCenter)
        if is_number(self.dtype):
            editor.setValidator(QDoubleValidator(editor))
        editor.returnPressed.connect(self.commitAndCloseEditor)
        return editor
