[dyntrans-cvs] qtrstringtest/src qtrstringtest.cpp,1.3,1.4
Status: Pre-Alpha
Brought to you by:
klichota
|
From: Krzysztof L. <kli...@us...> - 2004-09-27 23:49:58
|
Update of /cvsroot/dyntrans/qtrstringtest/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12541/src Modified Files: qtrstringtest.cpp Log Message: * Added menu with translated menu entries to test QPopupMenu translation edition. * Set style to "motif" statically as dynamically loaded styles are not binary compatible and cause segfault. Index: qtrstringtest.cpp =================================================================== RCS file: /cvsroot/dyntrans/qtrstringtest/src/qtrstringtest.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- qtrstringtest.cpp 26 Sep 2004 10:43:43 -0000 1.3 +++ qtrstringtest.cpp 27 Sep 2004 23:49:46 -0000 1.4 @@ -55,6 +55,7 @@ qtrstringtest::qtrstringtest() : QMainWindow( 0, "qtrstringtest", WDestructiveClose ) { + QApplication::setStyle("motif"); QApplication::installTrHandler(&basicTrHandler); printer = new QPrinter; @@ -145,6 +146,12 @@ help->insertItem( tr("What's &This"), this, SLOT(whatsThis()), SHIFT+Key_F1 ); this->e = new QTextEdit( this, "editor" ); + this->e->hide(); + + QPopupMenu *translatedMenu = new QPopupMenu( this ); + menuBar()->insertItem(dyntr("&Translated menu"), translatedMenu); + translatedMenu->insertItem( dyntr("T&his is translated entry"), this, SLOT(about())); + translatedMenu->insertItem( dyntr("Try &changing accelerators"), this, SLOT(about())); QVBox *topWidget = new QVBox(this); |