Table view, proxy and model
-
wrote on 13 May 2016, 13:49 last edited by
Hi
I have 2 QTableView, displaying data from 2 QSortFilterProxyModel which have the same sourceModel.
The first tableview display the data without filtering it but the second filter the data.
What i want is to remove the selected row (in 1st tableview) from the second tableview.How can i identify, in the second view, the selected row in the first view ?
Thx
-
Hi,
You need to implement a custom QSortFilterProxyModel and reimplement the filterAcceptsRow.
On possibility would be to pass the selected row number to your custom proxy and not accept that row.
Hope it helps
-
Hi,
You need to implement a custom QSortFilterProxyModel and reimplement the filterAcceptsRow.
On possibility would be to pass the selected row number to your custom proxy and not accept that row.
Hope it helps
-
Well, add a setter method to your custom proxy model and trigger the filtering if the row number changes.
1/4