(indexes, view)
Map model indexes through a views QSortFilterProxyModel
Map model indexes through a views QSortFilterProxyModel
Map model indexes through a views QSortFilterProxyModel
def source_indexes(indexes, view):
    """ Map model indexes through a views QSortFilterProxyModel
    """
    model = view.model()
    if isinstance(model, QSortFilterProxyModel):
        return list(map(model.mapToSource, indexes))
    else:
        return indexes
def source_indexes ( indexes , view ) : model = view . model ( ) if isinstance ( model , QSortFilterProxyModel ) : return list ( map ( model . mapToSource , indexes ) ) else : return indexes