Results 1 to 2 of 2

Thread: Speed up QTableView sorting

  1. #1
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Speed up QTableView sorting

    I have a subclassed QAbstractTableModel, a QTableView and a QSortFilterProxyModel, using all together, all is ok but i'd lik to speed up te proxy sorting. If the table have 10,000 rows or more, it takes about 1 second to sort, it's not a lot of time i know, but, is there any way to make it instantly?
    Like sublclassing QSortProxyModel or sort the QAbstractTableModel directly... it's possible to sort 15.000 rows instanty?
    Thanks in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Speed up QTableView sorting

    Sorting speed depends on the speed of the underlying model, especially its index() and data() implementation. So to speed up sorting you need to optimize your model.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QTableView sorting
    By realdarkman71 in forum Newbie
    Replies: 12
    Last Post: 1st December 2010, 22:45
  2. QTableView sorting
    By gabriels in forum Qt Programming
    Replies: 11
    Last Post: 6th October 2010, 17:13
  3. QSqlTableModel and QTableView and sorting
    By JeanC in forum Qt Programming
    Replies: 1
    Last Post: 5th April 2008, 13:22
  4. QTableView sorting
    By Bojan in forum Newbie
    Replies: 2
    Last Post: 28th September 2006, 08:11
  5. Sorting QTableView
    By Jimmy2775 in forum Qt Programming
    Replies: 7
    Last Post: 9th February 2006, 16:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.