indexes = table.selectionModel().selectedRows() for index in sorted(indexes): print('Row %d is selected' % index.row())