PDA

View Full Version : Visual Studio add-in, generates QString::fromUtf8(...) instead of tr("")



galrub
13th May 2011, 15:00
Hi all,

I'm using the QT add-in for visual studio (VS2010) and, when it generates the header and source file from the .ui file it places all the strings as QString::fromUtf8(...) instead of the tr(..) which is needed for i18n.

any idea how to change it?

Thanks,
G

galrub
14th May 2011, 08:02
sorry, my mistake, I don't really understand the logic behind this but the generated class has a translation loading function in the end called:

void retranslateUi(QMainWindow *mainWindow)
and it doesn't use tr() function at all.