Hi everyone!

I want to do custom sorting with a QList (its a list of pointers so the sorting has to be custom...)

I followed the doc and wrote:
Qt Code:
  1. bool QBsdPortGlobal::lessThan(QBsdPort* p1, QBsdPort* p2);
  2. {
  3. return p1->origin() < p2->origin();
  4. }
To copy to clipboard, switch view to plain text mode 
but whenver I call
Qt Code:
  1. qSort(m_collection.begin(),
  2. m_collection.end(),
  3. lessThan);
To copy to clipboard, switch view to plain text mode 
I get:
Qt Code:
  1. bsdportglobal.cpp:497: error: no matching function for call to 'qSort(QList<QBsdPort*>::iterator, QList<QBsdPort*>::iterator, <unresolved overloaded function type>)'
  2. /usr/local/include/qt4/QtCore/qalgorithms.h:203: note: candidates are: void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = QList<QBsdPort*>::iterator, LessThan = bool (QBsdPortGlobal::*)(QBsdPort*, QBsdPort*)]
To copy to clipboard, switch view to plain text mode 
Why is lessThan() unresovled? I put it in the source and it is declared in the header. The fcuntion works otherwise...

Thanks for your help!