Re: QDir - Entrylist, sort
You can override QDirModel::sort and provide your own sorting
Re: QDir - Entrylist, sort
I am a beginner in Qt,
can you please tell me how can i override Qdir::sort ?
Please give one example.
Re: QDir - Entrylist, sort
The problem is that you are comparing text strings, and so test1, test10 & test100 will always be less than test2. What you need to do is seperate the text and numeric portions and do your own custom sort.
To override QDir::Sort, just subclass QDir and override the default implementation of sort by writing your own.
Re: QDir - Entrylist, sort
Can you please send me the algorithem for separating numeric and text and sorting them as 1, 2, 3,10.
If i am using sort algorithem then it is sorting as 1,10,2,3.
Please help me.
Re: QDir - Entrylist, sort
I separated numeric and text part, can you please tell how can i do sort that it will arrange as
1
2
3
10