
Originally Posted by
Nefastious
How exactly should I do that?
like this?
...
proxyModel->mapToSource();
model->removeRows( current, 1 );
...
...
proxyModel->mapToSource();
model->removeRows( current, 1 );
...
To copy to clipboard, switch view to plain text mode
Before you just guess how to do, just follow the link and read:
QModelIndex QSortFilterProxyModel::mapToSource ( const QModelIndex & proxyIndex ) const
so in your case:
foreach
( const QModelIndex & index, selection.
indexes() ) { rows.append( ui->View->model()->mapToSource(index).row() );
}
foreach ( const QModelIndex & index, selection.indexes() ) {
rows.append( ui->View->model()->mapToSource(index).row() );
}
To copy to clipboard, switch view to plain text mode
Bookmarks