code: def setModelData(self, editor, model, index):
          
          try:
              data = editor.getData()
          except InvalidInputError as ex:
              logger.warn(ex)
          else:
              # The value is set via the model so that signals are emitted
              logger.debug("ConfigItemDelegate.setModelData: {}".format(data))
              model.setData(index, data, Qt.EditRole)
docs: Gets data from the editor widget and stores it in the specified model at the item index.
              Does this by calling getEditorValue of the config tree item at the index.
  
              :type editor: QWidget
              :type model: ConfigTreeModel
              :type index: QModelIndex
  
              Reimplemented from QStyledItemDelegate.