[Qt-interest] QLocale::toString(int)

Jan janusius at gmx.net
Wed Feb 16 22:54:59 CET 2011


In a QStyledItemDelegate subclass I reimplemented

displayText(const QVariant & value, const QLocale & locale) const

but ...

return locale.toString(value.toInt());
no thousand separators (qDebug() << locale.name() says "de_DE");

If I use the static QLocale::system() ...
return QLocale::system().toString(value.toInt()); //correct, with 
thousand separators

QLocale::system() is "de_DE".

What is the difference here?

Bye,
Jan



More information about the Qt-interest-old mailing list