Unsolved Table view, proxy and model
-
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
-
@SGaist
Hi and thx for the reply,
I tried to use filterAcceptsRow but i don't know how to give to the function the selected row in the first tableview.Thx
-
Well, add a setter method to your custom proxy model and trigger the filtering if the row number changes.