Hi,
You can use QLocale for this:
QLocale::Country qCountry
= qLocale.
country();
QLocale::Language qLanguage
= qLocale.
country();
//Here you can play with "qCountry" and "qLanguage" variables to change the shortcut of your QAction to the correct key combination. Think on that in you can have multiple languages into the same country(Spain have Spanish,Catalan,Basque,Galician,...)
qMyAction.setShortcut(...);
QLocale qLocale = QLocale::system(); //Get the system locale
QLocale::Country qCountry = qLocale.country();
QLocale::Language qLanguage = qLocale.country();
//Here you can play with "qCountry" and "qLanguage" variables to change the shortcut of your QAction to the correct key combination. Think on that in you can have multiple languages into the same country(Spain have Spanish,Catalan,Basque,Galician,...)
qMyAction.setShortcut(...);
To copy to clipboard, switch view to plain text mode
Bookmarks