Results 1 to 4 of 4

Thread: QAbstractProxyModel lessThan [SOLVED]

  1. #1
    Join Date
    Aug 2008
    Posts
    39
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QAbstractProxyModel lessThan [SOLVED]

    So I have my own lessThan function to sort, but it's only sorting based on the first column. Is there a way to tell which column is attempting to be sorted? Sometimes the documentation assumes you know every aspect of qt, not all of us do!
    Last edited by killerwookie99; 15th September 2008 at 19:42.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QAbstractProxyModel lessThan

    Did u happen to look at QSortFilterProxyModel::setFilterKeyColumn ???

  3. #3
    Join Date
    Aug 2008
    Posts
    39
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QAbstractProxyModel lessThan

    I have when I use it and see the output it's always 0...

  4. #4
    Join Date
    Aug 2008
    Posts
    39
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QAbstractProxyModel lessThan

    Ok by dumb luck I figured out that if you do a left or right .column() it returns the data column it's in. I guess this'll work...

Similar Threads

  1. QAbstractProxyModel: adding a virtual column
    By ultim8 in forum Qt Programming
    Replies: 6
    Last Post: 28th August 2008, 17:10
  2. qSort with lessThan
    By soul_rebel in forum Qt Programming
    Replies: 4
    Last Post: 19th August 2008, 18:14
  3. QSortFilterProxyModel - lessThan sorts wrong column
    By ghorwin in forum Qt Programming
    Replies: 2
    Last Post: 21st July 2008, 09:06
  4. QAbstractProxyModel and QTreeView
    By niko in forum Qt Programming
    Replies: 5
    Last Post: 18th January 2008, 21:17
  5. QAbstractProxyModel and "virtual" columns
    By tranfuga25s in forum Qt Programming
    Replies: 3
    Last Post: 15th July 2007, 23:39

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.