Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QStringList::sort (  )  [inline]

Sorts the list of strings in ascending order (case sensitively).

Sorting is performed using Qt's qSort() algorithm, which operates in {linear-logarithmic time}, i.e. O({n} log {n}).

If you want to sort your strings in an arbitrary order, consider using the QMap class. For example, you could use a QMap<QString, QString> to create a case-insensitive ordering (e.g. with the keys being lower-case versions of the strings, and the values being the strings), or a QMap<int, QString> to sort the strings by some integer index.

See also:

Definition at line 143 of file qstringlist.h.

Referenced by QFont::substitutions().


Generated by  Doxygen 1.6.0   Back to index