Wincker

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

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 );






posted on 2012-01-07 09:03  Wincker  阅读(150)  评论(0)    收藏  举报