Easiest way is to put the values in to instances of a class or struct and have that class implement a "less than" operator
struct Data
{
int i;
bool operator<(const Data& other) const
{
// return true if "this" is less than "other", otherwise return false;
}
};
struct Data
{
int i;
QString s;
bool operator<(const Data& other) const
{
// return true if "this" is less than "other", otherwise return false;
}
};
To copy to clipboard, switch view to plain text mode
The put into a QList or QVector and use qSort()
Cheers,
_
Bookmarks