PDA

View Full Version : sort() implementation questions



BreakBad
27th December 2012, 18:34
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

Zlatomir
27th December 2012, 20:36
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 (http://doc.qt.digia.com/qt/qtalgorithms.html#qSort)
In all the other cases tell us more about your list and if you need to implement yourself or not.