Results 1 to 5 of 5

Thread: qSort with lessThan

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Dec 2006
    Posts
    849
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    6
    Thanked 163 Times in 151 Posts

    Default Re: qSort with lessThan

    You can not use a member function (needs an object to be called upon).

    You can:
    * make your function static
    * make a plain function (outside of a class)
    * make a regular function object
    * use something like Boost.Bind

    HTH

  2. The following 2 users say thank you to caduel for this useful post:

    Ishmael (26th September 2010), soul_rebel (19th August 2008)

Similar Threads

  1. Sorting using qSort(), - if QList contains POINTERS
    By joseph in forum Qt Programming
    Replies: 13
    Last Post: 18th August 2013, 18:55
  2. QSortFilterProxyModel - lessThan sorts wrong column
    By ghorwin in forum Qt Programming
    Replies: 2
    Last Post: 21st July 2008, 09:06
  3. qSort() problem
    By darksaga in forum Qt Programming
    Replies: 5
    Last Post: 17th August 2007, 11:47
  4. qSort doesn't work with member function
    By ber_44 in forum Qt Programming
    Replies: 10
    Last Post: 2nd June 2007, 12:00
  5. [Qt4] QSORT
    By jane in forum Qt Programming
    Replies: 6
    Last Post: 24th May 2006, 23:38

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.