1 #ifndef _PYTHONQTUTILS_H
2 #define _PYTHONQTUTILS_H
49 #include <QMetaMethod>
53 inline QByteArray
signature(
const QMetaMethod& method) {
54 #if( QT_VERSION >= QT_VERSION_CHECK(5,0,0) )
55 return method.methodSignature();
57 return QByteArray(method.signature());
61 inline QByteArray
methodName(
const QMetaMethod& method) {
62 #if( QT_VERSION >= QT_VERSION_CHECK(5,0,0) )
65 QByteArray sig(method.signature());
66 int idx = sig.indexOf(
'(');
72 inline QByteArray
typeName(
const QMetaMethod& method) {
73 #if( QT_VERSION >= QT_VERSION_CHECK(5,0,0) )
74 QByteArray result = method.typeName();
75 if (result ==
"void") {
81 return method.typeName();
88 return PyType_Check(obj);
91 return (obj->ob_type == &PyClass_Type || obj->ob_type == &PyType_Type);
QByteArray methodName(const QMetaMethod &method)
QByteArray typeName(const QMetaMethod &method)
bool isPythonClassType(PyObject *obj)
Returns of the python object is a class type.
QByteArray signature(const QMetaMethod &method)