diff options
Diffstat (limited to 'tools/linguist/tutorial/tt1')
-rw-r--r-- | tools/linguist/tutorial/tt1/main.cpp | 25 | ||||
-rw-r--r-- | tools/linguist/tutorial/tt1/tt1.pro | 4 |
2 files changed, 29 insertions, 0 deletions
diff --git a/tools/linguist/tutorial/tt1/main.cpp b/tools/linguist/tutorial/tt1/main.cpp new file mode 100644 index 0000000..7d10349 --- /dev/null +++ b/tools/linguist/tutorial/tt1/main.cpp @@ -0,0 +1,25 @@ +/**************************************************************** +** +** Translation tutorial 1 +** +****************************************************************/ + +#include <qapplication.h> +#include <qpushbutton.h> +#include <qtranslator.h> + + +int main( int argc, char **argv ) +{ + QApplication app( argc, argv ); + + QTranslator translator( 0 ); + translator.load( "tt1_la", "." ); + app.installTranslator( &translator ); + + QPushButton hello( QPushButton::tr("Hello world!"), 0 ); + + app.setMainWidget( &hello ); + hello.show(); + return app.exec(); +} diff --git a/tools/linguist/tutorial/tt1/tt1.pro b/tools/linguist/tutorial/tt1/tt1.pro new file mode 100644 index 0000000..3b5249c --- /dev/null +++ b/tools/linguist/tutorial/tt1/tt1.pro @@ -0,0 +1,4 @@ +TEMPLATE = app +CONFIG += qt warn_on +SOURCES = main.cpp +TRANSLATIONS = tt1_la.ts |