10 QLocale egyptian(QLocale::Arabic, QLocale::Egypt);
11 QString s1 = egyptian.toString(1.571429E+07,
'e');
12 QString s2 = egyptian.toString(10);
14 double d = egyptian.toDouble(s1);
15 int i = egyptian.toInt(s2);
24 QLocale::setDefault(QLocale::C);
26 d = cLocale.toDouble(
"1234,56", &ok);
27 d = cLocale.toDouble(
"1234.56", &ok);
29 QLocale::setDefault(QLocale::German);
31 d = german.toDouble(
"1234,56", &ok);
32 d = german.toDouble(
"1234.56", &ok);
34 QLocale::setDefault(QLocale::English);
36 QString str = QString(
"%1 %L2 %L3").arg(12345).arg(12345).arg(12345, 0, 16);
44 QLocale swiss(
"de_CH");
53 QLocale c(QLocale::C);
54 d = c.toDouble(
"1234.56", &ok);
55 d = c.toDouble(
"1,234.56", &ok);
56 d = c.toDouble(
"1234,56", &ok);
58 QLocale german(QLocale::German);
59 d = german.toDouble(
"1234,56", &ok);
60 d = german.toDouble(
"1.234,56", &ok);
61 d = german.toDouble(
"1234.56", &ok);
63 d = german.toDouble(
"1.234", &ok);
72 QLocale c(QLocale::C);
73 d = c.toDouble(u"1234.56", &ok);
74 d = c.toDouble(u"1,234.56", &ok);
75 d = c.toDouble(u"1234,56", &ok);
77 QLocale german(QLocale::German);
78 d = german.toDouble(u"1234,56", &ok);
79 d = german.toDouble(u"1.234,56", &ok);
80 d = german.toDouble(u"1234.56", &ok);
82 d = german.toDouble(u"1.234", &ok);