araglin
18th December 2008, 19:32
I have model-view application - a table with many rows in it.
There is sorting enabled at the header of this table. (To sort data in the table I use Proxy model because without it sorting didn't work). The app works well except one little thing:
1. I select row in the table
2. I click on a column in the header to sort data
3. There is no auto-scroll to the raw I selected before sorting.
i.e. if my table has 100 rows and on the screen I can see only 20 of them, and I choose 1st raw, then press "sort", chosed row goes to the bottom of table and it would be nice if the application automatically scroll QTableView to show my row. How can I do this? Thank you!
There is sorting enabled at the header of this table. (To sort data in the table I use Proxy model because without it sorting didn't work). The app works well except one little thing:
1. I select row in the table
2. I click on a column in the header to sort data
3. There is no auto-scroll to the raw I selected before sorting.
i.e. if my table has 100 rows and on the screen I can see only 20 of them, and I choose 1st raw, then press "sort", chosed row goes to the bottom of table and it would be nice if the application automatically scroll QTableView to show my row. How can I do this? Thank you!