Hi guys
Does anyone know how to get the currency symbol for the current locale or format a money value with the correct locale currency symbol?
Thanks
Jeff
Hi guys
Does anyone know how to get the currency symbol for the current locale or format a money value with the correct locale currency symbol?
Thanks
Jeff
I just google this: currency+symbol+qtcentre...and:
get the currency symbol only:
QString currencySymbol = QLocale("de_CH").currencySymbol();
get a fully formated currency string:
QString amountOfMoney = QLocale("de_CH").currencyString(-100);
other pages to inform yourself:
http://doc.qt.nokia.com/4.8-snapshot...gargument.html
http://developer.qt.nokia.com/doc/qt-4.8/qlocale.html
hope it helps
Jeffb (2nd February 2012)
Thanks - I'll give it a try tomorrow.
Just realized I am on Qt 4.7 and that is a new feature in Qt 4.8 - I'll have to upgrade.
Cheers
Jeff
Bookmarks