Usage of QT Linguist
1. Generate pro file for the project
qmake -project
2. Add the following script into the pro file
TRANSLATIONS = ***.ts
3. Generate ts file
lupdate ***.pro
4. Use QT Linguist to edit the ts file
5. Generate qm file in QT Linguist
6. Use the qm in code
#include <QTranslator>
QTranslator translator( 0 );
translator1.load( "**.qm", "." );
myApp.installTranslator( &translator );

浙公网安备 33010602011771号