I use qtableview to display the data of QSqlTableModel
suppose model has 10000 rows, I would like to display 50 rows per page, is it possible to implement it using qtableview? Or I need to reimplement a customer view?
Thanks.
I use qtableview to display the data of QSqlTableModel
suppose model has 10000 rows, I would like to display 50 rows per page, is it possible to implement it using qtableview? Or I need to reimplement a customer view?
Thanks.
Last edited by tdm; 1st March 2017 at 01:55.
There no direct support, but can be achieved in couple of ways, I prefer implementing a custom QAbstractProxyModel, filtering on QSqlTableModel and a QTableView with couple of buttons assisting the page navigation (Next, Prev, First, Last etc), may be also change the page size.
When you know how to do it then you may do it wrong.
When you don't know how to do it then it is not that you may do it wrong but you may not do it right.
tdm (2nd March 2017)
Bookmarks