Line | |
---|
1 | /****************************************************************
|
---|
2 | **
|
---|
3 | ** Translation tutorial 1
|
---|
4 | **
|
---|
5 | ****************************************************************/
|
---|
6 |
|
---|
7 | #include <qapplication.h>
|
---|
8 | #include <qpushbutton.h>
|
---|
9 | #include <qtranslator.h>
|
---|
10 |
|
---|
11 |
|
---|
12 | int main( int argc, char **argv )
|
---|
13 | {
|
---|
14 | QApplication app( argc, argv );
|
---|
15 |
|
---|
16 | QTranslator translator( 0 );
|
---|
17 | translator.load( "tt1_la", "." );
|
---|
18 | app.installTranslator( &translator );
|
---|
19 |
|
---|
20 | QPushButton hello( QPushButton::tr("Hello world!"), 0 );
|
---|
21 |
|
---|
22 | app.setMainWidget( &hello );
|
---|
23 | hello.show();
|
---|
24 | return app.exec();
|
---|
25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.