Results 1 to 4 of 4

Thread: QSortFilterProxyModel - sort strings

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2006
    Posts
    33
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Windows

    Default QSortFilterProxyModel - sort strings

    I am using this model with my overidden QAbstractTableModel model. The problem I see with the sort of the QSortFilterProxyModel is it incorrectly sorts my column that contains integers.
    For instance, if the data is as follows:
    2, 6, 1, 9, 0, 10.

    It gets sorted as follows:
    0, 1, 10, 2, 6, 9

    Obviously, 10 should not follow 1. Is there a way to correctly sort this other than creating my own ProxyModel that derives from QSortFilterProxyModel?

    Thanks,
    DP
    Last edited by DPinLV; 29th August 2006 at 00:34.

Similar Threads

  1. Drag and drop items in view to sort order
    By Big Duck in forum Qt Programming
    Replies: 1
    Last Post: 25th May 2006, 19:43
  2. Sort datatable
    By zlatko in forum Qt Programming
    Replies: 1
    Last Post: 10th May 2006, 08:43

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.