summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorormorph <roma251078@mail.ru>2024-04-28 15:13:46 +0300
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-04-30 11:56:48 +0900
commit03a1fe47182f68ef6267676c290469b0b9a3aa8f (patch)
treee5fe400214d557f010f00d5607b332a80e40ed66
parent3dec37ecf0484f58246046efb26ba0fbbdf3dcd7 (diff)
downloadpytqt-03a1fe47182f68ef6267676c290469b0b9a3aa8f.tar.gz
pytqt-03a1fe47182f68ef6267676c290469b0b9a3aa8f.zip
Fix example translations for pytqt
Signed-off-by: ormorph <roma251078@mail.ru> (cherry picked from commit f8780f8ac8d4f5955828d8c3a927bed453a3630b)
-rwxr-xr-xexamples/i18n/i18n.py4
-rw-r--r--examples/i18n/mywidget.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/i18n/i18n.py b/examples/i18n/i18n.py
index ef17d27..db23cb6 100755
--- a/examples/i18n/i18n.py
+++ b/examples/i18n/i18n.py
@@ -2,7 +2,7 @@
# Copyright (c) 2002 Detlev Offenbach <detlev@die-offenbachs.de>
-from whrandom import randint
+from random import randint
import sys
from PyTQt.tqt import *
@@ -109,7 +109,7 @@ def main(argv):
r = dlg.exec_loop()
if r:
- tight = tqApp.desktop().screen().width < 1024
+ tight = tqApp.desktop().screen().width() < 1024
x = 5
y = 25
for i in range(0,len(qm)):
diff --git a/examples/i18n/mywidget.py b/examples/i18n/mywidget.py
index 681d98a..7dac01c 100644
--- a/examples/i18n/mywidget.py
+++ b/examples/i18n/mywidget.py
@@ -25,9 +25,9 @@ class MyWidget(TQMainWindow):
self.gbox = TQButtonGroup(1, TQGroupBox.Horizontal,
self.trUtf8("View"), self.central)
- rb = TQRadioButton(tqApp.translate('MyWidget','Perspective'), self.gbox)
- rb = TQRadioButton(tqApp.translate('MyWidget','Isometric'), self.gbox)
- rb = TQRadioButton(tqApp.translate('MyWidget','Oblique'), self.gbox)
+ rb = TQRadioButton(tqApp.translate(b'MyWidget',b'Perspective'), self.gbox)
+ rb = TQRadioButton(tqApp.translate(b'MyWidget',b'Isometric'), self.gbox)
+ rb = TQRadioButton(tqApp.translate(b'MyWidget',b'Oblique'), self.gbox)
self.initChoices(self.central)