(view)
return [r.row() for r in rows]
Return the selected rows in the view.
Return the selected rows in the view.
Return the selected rows in the view .
def selected_rows(view):
        """ Return the selected rows in the view.
        """
        rows = view.selectionModel().selectedRows()
        model = view.model()
        if isinstance(model, QSortFilterProxyModel):
            rows = [model.mapToSource(r) for r in rows]
        return [r.row() for r in rows]
def selected_rows ( view ) : rows = view . selectionModel ( ) . selectedRows ( ) model = view . model ( ) if isinstance ( model , QSortFilterProxyModel ) : rows = [ model . mapToSource ( r ) for r in rows ] return [ r . row ( ) for r in rows ]