See qSort() docs. You have to implement the operator<() or a LessThan function.