[PyQt] How to process QDBusPendingCallWatcher results?

Evade Flow evadeflow at gmail.com
Mon Aug 13 18:03:04 BST 2012

Oh, right---remove the decorator itself, not the decorator argument.
Then it works just fine, too. And I see what you mean about it being a
bit better to specify QDBusPendingCall instead of
QDBusPendingCallWatcher if leaving the decorator in place.
Thanks again!

On Mon, Aug 13, 2012 at 12:52 PM, Phil Thompson
<phil at riverbankcomputing.com> wrote:
> On Mon, 13 Aug 2012 11:46:19 -0400, Evade Flow <evadeflow at gmail.com>
> wrote:
>> I noticed that, too, and was a little surprised it worked anyway.
> The pyqtSlot() call is being ignored.
>> But
>> shouldn't it be:
>>     @QtCore.pyqtSlot(QtDBus.QDBusPendingCallWatcher)
>>     def callFinishedSlot(self, call):
> That would work but, as QDBusPendingCallWatcher is a sub-class of
> QDBusPendingCall and the slot only uses methods of the latter, then the
> class is more reusable if you use the latter.
>> When I remove it completely, I get:
>>     TypeError: callFinishedSlot() takes exactly 2 arguments (1 given)
> Sounds like you removed the argument rather than the decorator itself.
> Phil

More information about the PyQt mailing list