We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 799982b commit d439f1cCopy full SHA for d439f1c
2 files changed
src/PythonQtStdDecorators.cpp
@@ -42,7 +42,7 @@
42
#include "PythonQtStdDecorators.h"
43
#include "PythonQt.h"
44
#include "PythonQtClassInfo.h"
45
-
+#include <QCoreApplication>
46
47
bool PythonQtStdDecorators::connect(QObject* sender, const QByteArray& signal, PyObject* callable)
48
{
@@ -153,3 +153,9 @@ QVariantList PythonQtStdDecorators::children(QObject* o)
153
}
154
return v;
155
156
+
157
+QString PythonQtStdDecorators::tr(QObject* obj, const QByteArray& text, const QByteArray& ambig, int n)
158
+{
159
+ return QCoreApplication::translate(obj->metaObject()->className(), text.constData(), ambig.constData(), QCoreApplication::CodecForTr, n);
160
+}
161
src/PythonQtStdDecorators.h
@@ -91,6 +91,8 @@ public slots:
91
int static_Qt_qrand() { return qrand(); }
92
void static_Qt_qsrand(uint a) { qsrand(a); }
93
94
+ QString tr(QObject* obj, const QByteArray& text, const QByteArray& text = QByteArray(), int n = -1);
95
96
QByteArray static_Qt_SIGNAL(const QByteArray& s) { return QByteArray("2") + s; }
97
QByteArray static_Qt_SLOT(const QByteArray& s) { return QByteArray("1") + s; }
98
0 commit comments