PDA

View Full Version : Unicode Collation Sorting using QCollator in Qt 5.2



santosh.kumar
14th March 2014, 09:05
Hi

I have to sort English, Unicode , Numeric, Expression string.
I didn't find properly to sort these correctly. In MacOSX Finder or OSX using Unicode collation Sorting algorithm, in which 'a' and 'A' treated same in sorting.

In Qt 5.2, I found there is one class QCollator, which sort items according to Unicode collator sorting.

But i didn't find any example or help sample code for this.

Can anybody help me in sorting using QCollator.

Thanks
Santosh

anda_skoa
14th March 2014, 11:51
Not sure what you are looking for? Its compare() method's documentation seems to be pretty self explanatory.

Cheers,
_