PDA

View Full Version : qtableview multiply page support



tdm
1st March 2017, 01:47
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.

Santosh Reddy
1st March 2017, 04:41
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.