Sort QFileInfoList to handle file names that end with numbers
Currently if you have files that end in numbers, a QFileInfoList list created by calling dir.entryInfoList() appears in the following order,
I want to sort a QFileInfoList so that it is number aware i.e the list is as follows,
Any help much appreciated.
Take Name of file, split with each name with "_",
Take the second for each (1=> test 2=>1.txt)
then split this with "." now you have 1 2 3 4 5 6 7 8 9 10 11 ...
If people are interested....I did some more searching and thinking and the way to do this is to use a qSort with a custom struct that enables a "Natural Sort",