From 479f5f799523bffbcc83dff581a2299c047c6fff Mon Sep 17 00:00:00 2001
From: tpearson
Whenever PyKDE expects a QStringTQString as a function argument, a Python string object or a Python Unicode object can be provided instead, and PyKDE will do the necessary conversion automatically.
You may also manually convert Python string and Unicode objects to QStringTQStrings by using the QStringTQString constructor as demonstrated in the following code fragment.qs1 = QString('Converted Python string object')
-qs2 = QString(u'Converted Python Unicode object')qs1 = TQString('Converted Python string object')
+qs2 = TQString(u'Converted Python Unicode object') |
In order to convert a QStringTQString to a Python string object use the Python str() to a null QStringTQString and an empty QStringTQString both result in an empty Python string object.
In order to convert a QStringTQString to a Python Unicode object use the Python unicode() to a null QStringTQString and an empty QStringTQString both result in an empty Python Unicode object.
c = QColor(); -c = QColor();c = TQColor(); +c = TQColor();
c = QColor() -c = QColor()c = TQColor() +c = TQColor()
self.c1 = QColor() -self.c2 = QColor()self.c1 = TQColor() +self.c2 = TQColor()
So, in the following Python fragment, the first QLabelTQLabel is not destroyed when the second is assigned to because the parent QWidgetTQWidget still has a reference to it.
p = QWidget()
-l = QLabel('First label',p)
-l = QLabel('Second label',p)p = TQWidget()
+l = TQLabel('First label',p)
+l = TQLabel('Second label',p) |
tab = QTab() +>tab = TQTab() tab.label = "First Tab" -tab.r = QRect(10,10,75,30)
-In a normal Qt installation, every descendant of QObject inherits two methods -(tr (const char *) and tr (const char *, const char *) from QObject explicitly +In a normal Qt installation, every descendant of TQObject inherits two methods +(tr (const char *) and tr (const char *, const char *) from TQObject explicitly and also overloads these methods via the moc mechanism (by defining Q_OBJECT in the class declaration). KDE however is compiled with -DQT_NO_TRANSLATION, which prevents moc from creating the overloading tr() methods, and also produces @@ -330,9 +330,9 @@ side-effects with a normal Qt installation which was compiled without the
PyKDE handles this situation by NOT providing tr() methods (either the inherited -methods from QObject or the moc generated methods) for any KDE based QObject -descendant. The tr() methods are static, so QObject::tr () methods are available -via PyQt, as are tr() methods for any PyQt QObject descendant. PyKDE's handling +methods from TQObject or the moc generated methods) for any KDE based QObject +descendant. The tr() methods are static, so TQObject::tr () methods are available +via PyQt, as are tr() methods for any PyQt TQObject descendant. PyKDE's handling of these methods has no effect on PyQt.
Instead of the tr() methods, KDE uses corresponding i18n() methods for translating. -- cgit v1.2.3