I have the following datastructure.
QList<QVariant> fieldsList
How can I sort this list? This list contains strings. I want to sort the fieldList
alphabetically?
In Qt5, it seems qSort
is deprecated. It's recommended to use:
#include <algorithm>
QList<QVariant> fieldsList;
std::sort(fieldsList.begin(), fieldsList.end());
Reference: site