[Interest] Problem with Translations using tr

Nicolas Krieger nicolas.krieger at medecom.fr
Thu Jan 31 11:12:42 CET 2019


I have a strange behaviour with translations.

In my application, I have ui files and cpp files.

In cpp files, I use the "tr" method, the classes inherits from QObject 
and the macro Q_OBECT is used.

I made a translation using linguist, strings in the ui and cpp files are 
visible in linguist and translated.

When I use this translation, only those defined for ui files are used. 
Strings defined by "tr" are not translated.

I made a test by replacing "tr" by "QApplication::translate" and it 
works. What could be wrong in my way to use "tr" ?

Qt 5.5

Visual Studio 2013

*Nicolas Krieger*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190131/a349a0a4/attachment.html>

More information about the Interest mailing list