This code work for me.
#include <QSystemLocale>
{
public: MySystemLocale() { }
{
return ".";
}
}
};
int main(int argc, char *argv[])
{
MySystemLocale appSystemLocale; // work fine
// MySystemLocale appSystemLocale;// not work
return a.exec();
}
#include <QSystemLocale>
class MySystemLocale : QSystemLocale
{
public: MySystemLocale() { }
QVariant query(QueryType type, QVariant in) const
{
if (type==QSystemLocale::DecimalPoint) {
return ".";
}
return QSystemLocale::query(type, in);
}
};
int main(int argc, char *argv[])
{
MySystemLocale appSystemLocale; // work fine
QApplication a(argc, argv);
// MySystemLocale appSystemLocale;// not work
return a.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks