Results 1 to 2 of 2

Thread: qtableview multiply page support

  1. #1
    Join Date
    Feb 2017

    Question qtableview multiply page support

    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?

    Last edited by tdm; 1st March 2017 at 02:55.

  2. #2
    Join Date
    Mar 2011
    Hyderabad, India
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    MacOS X Unix/X11 Windows
    Wiki edits

    Default Re: qtableview multiply page support

    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.

  3. The following user says thank you to Santosh Reddy for this useful post:

    tdm (2nd March 2017)

Similar Threads

  1. multiply a widget by pushing a button
    By mifmef in forum Newbie
    Replies: 1
    Last Post: 25th October 2015, 20:17
  2. Multi-page tiff image support for qimage
    By Johnny in forum Qt Programming
    Replies: 1
    Last Post: 5th January 2013, 17:15
  3. How can I support page up/page down on QTextEdit
    By wesley in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2010, 20:18
  4. Multiply defined symbols
    By jblovloss in forum Qwt
    Replies: 0
    Last Post: 17th July 2009, 17:47
  5. QRegion multiply
    By xgoan in forum Qt Programming
    Replies: 1
    Last Post: 4th August 2006, 10:54

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.