diff options
Diffstat (limited to 'examples3/i18n')
-rwxr-xr-x | examples3/i18n/i18n.py | 10 | ||||
-rw-r--r-- | examples3/i18n/mywidget.py | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/examples3/i18n/i18n.py b/examples3/i18n/i18n.py index 8595d0b..866b097 100755 --- a/examples3/i18n/i18n.py +++ b/examples3/i18n/i18n.py @@ -61,7 +61,7 @@ wlist = [] # keep reference to widgets def showLang(lang): global translator - qApp.setPalette(TQPalette(TQColor(220-randint(0,64),220-randint(0,64),220-randint(0,64)))) + tqApp.setPalette(TQPalette(TQColor(220-randint(0,64),220-randint(0,64),220-randint(0,64)))) language = "mywidget_"+lang+".qm" fi = TQFileInfo(language) @@ -73,12 +73,12 @@ def showLang(lang): return None if translator is not None: - qApp.removeTranslator(translator) + tqApp.removeTranslator(translator) translator = None translator = TQTranslator(None) translator.load(language,".") - qApp.installTranslator(translator) + tqApp.installTranslator(translator) m = MyWidget() m.setCaption("PyTQt Example - i18n - " + unicode(m.caption())) wlist.append(m) @@ -109,7 +109,7 @@ def main(argv): r = dlg.exec_loop() if r: - tight = qApp.desktop().screen().width < 1024 + tight = tqApp.desktop().screen().width < 1024 x = 5 y = 25 for i in range(0,len(qm)): @@ -119,7 +119,7 @@ def main(argv): if w == None: sys.exit(0) - app.connect(app, SIGNAL('lastWindowClosed()'), qApp, SLOT('quit()')) + app.connect(app, SIGNAL('lastWindowClosed()'), tqApp, SLOT('quit()')) w.setGeometry(x,y,197,356) w.show() if tight: diff --git a/examples3/i18n/mywidget.py b/examples3/i18n/mywidget.py index f69cebf..c714910 100644 --- a/examples3/i18n/mywidget.py +++ b/examples3/i18n/mywidget.py @@ -15,7 +15,7 @@ class MyWidget(TQMainWindow): self.setCaption(self.trUtf8("""Internationalization Example""")) self.file = TQPopupMenu(self) - self.file.insertItem(self.trUtf8("E&xit"), qApp, SLOT("quit()"), + self.file.insertItem(self.trUtf8("E&xit"), tqApp, SLOT("quit()"), TQKeySequence(self.trUtf8("Ctrl+Q","File|Quit"))) self.menuBar().insertItem(self.trUtf8("&File"), self.file) @@ -25,9 +25,9 @@ class MyWidget(TQMainWindow): self.gbox = TQButtonGroup(1, TQGroupBox.Horizontal, self.trUtf8("View"), self.central) - rb = TQRadioButton(qApp.translate('MyWidget','Perspective'), self.gbox) - rb = TQRadioButton(qApp.translate('MyWidget','Isometric'), self.gbox) - rb = TQRadioButton(qApp.translate('MyWidget','Oblique'), self.gbox) + rb = TQRadioButton(tqApp.translate('MyWidget','Perspective'), self.gbox) + rb = TQRadioButton(tqApp.translate('MyWidget','Isometric'), self.gbox) + rb = TQRadioButton(tqApp.translate('MyWidget','Oblique'), self.gbox) self.initChoices(self.central) |