I have an application with buttons that have icons set for the various click states, no actual QPushButton text is set or displayed; it is all contained in the icon.
These icon files include text that requires translation, and have already been generated for each language and state. I am looking for a way to use the QTranslator or QAction class to automatically select which localized version of the button to use based on the selected main language.
For example:
BTN_Media_Browse->setIcon(QIcon(QPixmap(tr(":/Images/BTN_Media_Browse_Unpressed.png"))));
I have followed the instructions on the QT Wiki: Multi Language Application but the buttons do not show up in the generated translation (.ts) files. Having a switch case for each instance of its use based on the language is not ideal.