code: def select_row(self, steps):
          
          row = self.current_row() + steps
          if 0 <= row < self.count():
              self.set_current_row(row)
docs: Select row in list widget based on a number of steps with direction.
  
          Steps can be positive (next rows) or negative (previous rows).