[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] How to process QDBusPendingCallWatcher results?
From: Evade Flow <evadeflow () gmail ! com>
Date: 2012-08-13 17:03:04
Message-ID: CAMAb8ZOHRV0=vnx+7XLuyDME=0G=JWOwg0A9-Q9Jep4U5RfceQ () mail ! gmail ! com
[Download RAW message or body]
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@riverbankcomputing.com> wrote:
> On Mon, 13 Aug 2012 11:46:19 -0400, Evade Flow <evadeflow@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
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic