Results 1 to 2 of 2

Thread: sort() implementation questions

  1. #1
    Join Date
    Jun 2012
    Posts
    25
    Thanks
    7
    Qt products
    Qt4
    Platforms
    MacOS X

    Question sort() implementation questions

    I would like explicitly sort the entire list of objects in one method call. I'm unsure of how to proceed with moving indexes aroundin the sort() method, or if I would be reassigning internalPointers. How do I proceed? Examples anywhere?

    TYVM
    Last edited by BreakBad; 27th December 2012 at 19:38.

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: sort() implementation questions

    I'm not sure that i understood, do you want to write a sort function yourself or find an sort already implemented?
    In case two (and if list is a QList) you can use qSort
    In all the other cases tell us more about your list and if you need to implement yourself or not.

Similar Threads

  1. How to Sort a QModelIndexList
    By enricong in forum Qt Programming
    Replies: 2
    Last Post: 31st August 2016, 16:04
  2. How to sort a Qlist AND get a sort key?
    By agerlach in forum Qt Programming
    Replies: 3
    Last Post: 26th July 2010, 18:44
  3. questions re: inline implementation, const
    By Urthas in forum Newbie
    Replies: 1
    Last Post: 2nd May 2009, 22:41
  4. QAbstractTableModel and sort
    By foxyproxy in forum Qt Programming
    Replies: 7
    Last Post: 25th March 2008, 09:30
  5. 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.