Take the 2-minute tour ×  In Qlinguist, I translated ui and some
corresponding warning messages, generated qm file, and loaded
it, but in the result it only can translate the ui, but not
those warning messages. My code is like this:  void
MainWindow::translate()      QTranslator translator;
translator.load ( "Test.qm", "D:\\" );
qApp->installTranslator ( &translator );      retranslateUi (
this );   One of my warning messages is in this form:
QMessageBox::warning( this, QMessageBox::tr("ERROR"),
QMessageBox::tr("Invalid IP adress") );  This string can be load
by lupdate, and I translated it in its qm file, but still cannot
see its translation after running. Here I asked about it, but I
have to open this new question in order to solve it with
someone's help. Can someone help me on this? Thank you in
advance.  share|improve this question  1 Answer 1  up vote 2
down vote accepted  Creating the translator on the stack, it
will be deleted right away at the end of translate(). Try to
create it on the hea