code: def setEditorData(self, spinBox, index):
          
          if index.isValid():
              value = index.model().data(index, QtCore.Qt.EditRole)
              spinBox.setValue(value)
docs: Sets the data to be displayed and edited by the editor from the data model item specified by the model index.
  
          Args:
              spinBox (BigIntSpinbox): editor widget.
              index (QModelIndex): model data index.