Override locale with QSystemLocale
Hi,
I need QString::localeAwareCompare to properly sort German names.
This works on my desktop.
Unfortunately my tablet seems to provide a wrong system locale.
I've tried
as well as
but "Z" is still less than "Ö" (When "Ö" shoud be between "O" and "P").
I've looked into QSystemLocale, but there are no setter methods (and the documentation
is vague, actually saying " only useful in very rare cases."), so I don't understand how I
can use this. I didn't find anything particularly helpful about this on web research or in this Forum.
Is there any way to override the system locale and force Qt into using
a specific locale?
How do I use QSystemLocale (if at all) to force Qt into German sorting?
Re: Override locale with QSystemLocale
Nobody with an idea or a pointer to some documentation?
Re: Override locale with QSystemLocale
This code work for me.
Code:
#include <QSystemLocale>
{
public: MySystemLocale() { }
{
return ".";
}
}
};
int main(int argc, char *argv[])
{
MySystemLocale appSystemLocale; // work fine
// MySystemLocale appSystemLocale;// not work
return a.exec();
}