Auliyaa
15th March 2010, 13:54
Hi everyone,
I'm intergrating Qt internationalization features to my application and I'm experiencing some issues with the tr function.
Here's what's going on:
I have a class called MainController located in a dynamic library. This class is a sub-sub-sub...whatever...-sub class of QObject. This class is somehow displaying some textual information on the gui. So I'm using MainController:tr for any string I want to get translated.
I sucessfully generated the ts, translated everything and I provided the .qm file to the main function. Made sure everything was loaded before any of the Gui component could be created.
The problem is: I can't get my strings to be translated using this method. The only workaround I was able to find is to use QObject::tr in my code instead of MainController::tr. Making the trnaslation process pretty messy.
Any help would be appreciated.
Thanks in advance.
Regards
I'm intergrating Qt internationalization features to my application and I'm experiencing some issues with the tr function.
Here's what's going on:
I have a class called MainController located in a dynamic library. This class is a sub-sub-sub...whatever...-sub class of QObject. This class is somehow displaying some textual information on the gui. So I'm using MainController:tr for any string I want to get translated.
I sucessfully generated the ts, translated everything and I provided the .qm file to the main function. Made sure everything was loaded before any of the Gui component could be created.
The problem is: I can't get my strings to be translated using this method. The only workaround I was able to find is to use QObject::tr in my code instead of MainController::tr. Making the trnaslation process pretty messy.
Any help would be appreciated.
Thanks in advance.
Regards