[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] =?utf-8?q?How_to_process_QDBusPendingCallWatcher_results?=
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2012-08-13 16:52:24
Message-ID: 58661e31f8b5441f6fb2c2d7ae11d16d () localhost
[Download RAW message or body]

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