List of all currencies
I want to write a program that will be able to link currency symbol to its ISO code. So
$should be both recognized as US Dollar.
QLocaleis able to return both symbol and code for a given country, but I couldn't find a way to get list of all possible currencies or even symbol-ISO converter.
Can this be done automatically using Qt or would I have to create list manually?
From the top of my head, you'd have to implement a loop to go through all of QLocale's possibilities and from that generate the map you want.
you'd have to implement a loop to go through all of QLocale's possibilities
How do I do that though? I can't get collection of all currencies or even countries from
Qlocale, so there's nothing to loop through.
Getting a list of all locales:
QList<QLocale> allLocales = QLocale::matchingLocales(QLocale::AnyLanguage, QLocale::AnyScript, QLocale::AnyCountry);