That sounds awfully like your list is a list of strings that represent dates and not QDates at all. QDate sorts correctly.
Qt Code:
  1. #include <QtCore>
  2.  
  3. int main(int argc, char **argv) {
  4. QCoreApplication app(argc, argv);
  5.  
  6. QList<QDate> dates;
  7. dates << QDate(2014, 5, 2) // Friday
  8. << QDate(2014, 4, 28) // Monday
  9. << QDate(2014, 4, 26); // Saturday
  10.  
  11. qDebug() << "Before" << dates;
  12. qSort(dates.begin(), dates.end());
  13. qDebug() << "After " << dates;
  14.  
  15. return 0;
  16. }
  17.  
  18. // Before (QDate("Fri May 2 2014") , QDate("Mon Apr 28 2014") , QDate("Sat Apr 26 2014") )
  19. // After (QDate("Sat Apr 26 2014") , QDate("Mon Apr 28 2014") , QDate("Fri May 2 2014") )
To copy to clipboard, switch view to plain text mode