code: def stepEnabled(self):
          
          if self.value() > self.minimum() and self.value() < self.maximum():
              return self.StepUpEnabled | self.StepDownEnabled
          elif self.value() <= self.minimum():
              return self.StepUpEnabled
          elif self.value() >= self.maximum():
              return self.StepDownEnabled
docs: Virtual function that determines whether stepping up and down is legal at any given time.
  
          Returns:
              ored combination of StepUpEnabled | StepDownEnabled