[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:
http://www.pyside.org/docs/pyside/PySide/QtCore/Slot.html
Also, the pyQtSlot decorator has "return" argument to specify return value type:
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/new_style_signals_slots.html#PyQt4.QtCore.pyqtSlot
More information about the PyQt
mailing list