Return PythonQtObjectPtr from a call
Dynamic Python binding for Qt Applications
Brought to you by:
florianlink,
marcusbarann
Hello,
I am wondering if it's currently possible to call a python object's function and return
PythonQtObjectPtr
regardless of whether it's possible to convert it to, say,QVariantList
.My use case is rather straightforward. I want to create a numpy array and pass it as a return value from my slot. Right now to achieve this I need to write the code similar to the one below to avoid automatic conversion occurring in conversion from PyObject* to QVariant:
Is there a way to avoid such verbose code? Or should I just add a method a-la
callAndReturnObjectPtr()
toPythonQtObjectPtr
itself?Thanks,
Rostislav.