code: def setEditorData(self, editor, index):
          
          # We take the config value via the model to be consistent with setModelData
          data = index.model().data(index, Qt.EditRole)
          editor.setData(data)
docs: Provides the widget with data to manipulate.
              Calls the setEditorValue of the config tree item at the index.
  
              :type editor: QWidget
              :type index: QModelIndex
  
              Reimplemented from QStyledItemDelegate.