QTableView displaying a subset of rows in a random order

155 views Asked by At

I'm looking for a way to have a QTableView show a subset of the total rows in the QAbstractTableModel in a random order.

I have found QSortFilterProxyModel to display a subset of rows (filter). However, it can't do a random order, it can only do sorted (sort).
QAbstractProxyModel looked promising, but the editors don't even work when I use that transparantly. Maybe I'm missing something here, but reimplementing mapToSource and mapFromSource proves insufficient.

What would be the correct way to get this done?
I could obviously do this inside my model, but this feels wrong if it's only for viewing/editor purpose.

0

There are 0 answers