code: def stepBy(self, steps):
          
          oldValue = self.value()
  
          if oldValue == 0:
              newValue = steps
          elif steps == 1:
              newValue = self.value() * self.smallStepFactor
          elif steps == -1:
              newValue = self.value() / self.smallStepFactor
          elif steps == 10:
              newValue = self.value() * self.largeStepFactor
          elif steps == -10:
              newValue = self.value() / self.largeStepFactor
          else:
              raise ValueError("Invalid step size: {!r}, value={}".format(steps, oldValue))
  
          newValue = float(newValue)
  
          if newValue < self.minimum():
              newValue = self.minimum()
  
          if newValue > self.maximum():
              newValue = self.maximum()
  
          #logger.debug("stepBy {}: {} -> {}".format(steps, oldValue, newValue))
          try:
              self.setValue(newValue)
          except Exception:
              # TODO: does this ever happen? Better validation (e.g. catch underflows)
              logger.warn("Unable to set spinbox to: {!r}".format(newValue))
              self.setValue(oldValue)
docs: Function that is called whenever the user triggers a step. The steps parameter
              indicates how many steps were taken, e.g. Pressing Qt::Key_Down will trigger a call to
              stepBy(-1), whereas pressing Qt::Key_Prior will trigger a call to stepBy(10).