سؤال

I'm using qSort in Qt to sort QList containing struct. I noticed that Polish character "Ś" is at the end or beginning of sorted list (depending on order). Is there any string comparison function which places "Ś" next to "S"?

هل كانت مفيدة؟

المحلول

You need to use QString::localeAwareCompare for your comparison function.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top