PDA

View Full Version : Qt5.3 tr() needs to translate QString



ad5xj
1st June 2014, 18:39
I have need to translate the contents of a QString variable for display. Currently QApplication::tr() and qApp::tr() require char literal strings.

Is there a way to use tr() to translate the contents of a QString by converting it to Local8bit or Latin1 or something? So far all efforts do not translate.

d_stranz
2nd June 2014, 00:48
Have you tested to see if you are actually invoking the translation system by using tr() on a string literal for which you have created a translation?