[PyQt] pyqtSlot, getting "undefined" return values when called from qml javascript

Ville M. Vainio vivainio at gmail.com
Sat Apr 28 08:24:03 BST 2012

On Sat, Apr 28, 2012 at 1:10 AM, Andrew Suffield
<asuffield at suffields.me.uk> wrote:

>> I have a qml file invoking methods on a QObject subclass. I have used
>> @pyqtSlot decorator to expose the methods as slots.
>> I can see that the methods are run; however, the return values seem to
>> be discarded.
> Qt slots don't return anything...

On PySide, they do:


Also, the pyQtSlot decorator has "return" argument to specify return value type:


More information about the PyQt mailing list