code: def setModelData(self, spinBox, model, index):
          
          spinBox.interpretText()
          value = spinBox.value()
          model.setData(index, value, QtCore.Qt.EditRole)
docs: Gets data from the editor widget and stores it in the specified model at the item index.
  
          Args:
              spinBox (QDoubleSpinBox): editor widget.
              model (QAbstractItemModel): parent model.
              index (QModelIndex): model data index.