[Interest] Problem with Translations using tr
Kai Koehne
Kai.Koehne at qt.io
Thu Jan 31 16:16:56 CET 2019
> -----Original Message-----
> [...]
> 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" ?
Hard to say without seeing the code. Anyhow, you should double check which tr() is called - it must be the one from the class that is also shown as "Context" in Qt Linguist. Also, calling ::staticMetaObject.className() on this class should be the same as the 'Context'.
Kai
More information about the Interest
mailing list