Line | |
---|
1 | /****************************************************************
|
---|
2 | **
|
---|
3 | ** Translation tutorial 3
|
---|
4 | **
|
---|
5 | ****************************************************************/
|
---|
6 |
|
---|
7 | #include "mainwindow.h"
|
---|
8 |
|
---|
9 | #include <qapplication.h>
|
---|
10 | #include <qstring.h>
|
---|
11 | #include <qtextcodec.h>
|
---|
12 | #include <qtranslator.h>
|
---|
13 |
|
---|
14 | int main( int argc, char **argv )
|
---|
15 | {
|
---|
16 | QApplication app( argc, argv );
|
---|
17 |
|
---|
18 | QTranslator translator( 0 );
|
---|
19 | translator.load( QString("tt3_") + QTextCodec::locale(), "." );
|
---|
20 | app.installTranslator( &translator );
|
---|
21 |
|
---|
22 | MainWindow *mw = new MainWindow;
|
---|
23 | app.setMainWidget( mw );
|
---|
24 | mw->show();
|
---|
25 | return app.exec();
|
---|
26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.