code: def selectedIndexes(self):
          
          model = self.model()
          indexes = []
          for comp in self._selectedComponents:
              index = model.indexByComponent(comp)
              if index is None:
                  # must have been removed from model, discard
                  self._selectedComponents.remove(comp)
              else:
                  indexes.append(index)
          return indexes
docs: Returns a list of QModelIndex currently in the model