From 03a1fe47182f68ef6267676c290469b0b9a3aa8f Mon Sep 17 00:00:00 2001 From: ormorph Date: Sun, 28 Apr 2024 15:13:46 +0300 Subject: [PATCH] Fix example translations for pytqt Signed-off-by: ormorph (cherry picked from commit f8780f8ac8d4f5955828d8c3a927bed453a3630b) --- examples/i18n/i18n.py | 4 ++-- examples/i18n/mywidget.py | 6 +++--- 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 -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)