[PyKDE] setCaption for windows version
Gordon Tyler
gordon at doxxx.net
Mon Oct 27 18:10:01 GMT 2003
James Lamanna wrote:
> self.setCaption( self.tr("Internationalization Example" ) );
Don't you need to initialize the QTranslator stuff before using tr()?
For example, after you've created the QApplication:
# translation file for Qt
qt = QTranslator(None);
qt.load("qt_" + QTextCodec.locale(), ".")
app.installTranslator(qt)
# translation file for application strings
myapptr = QTranslator(None);
myapptr.load(APP_NAME.lower() + "_" + QTextCodec.locale(), ".")
app.installTranslator(myapptr)
Ciao,
Gordon
More information about the PyQt
mailing list