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

List:       pykde
Subject:    Re: [PyQt] Question about the new Signals / Slots mechanism.
From:       "Hans-Peter Jansen" <hpj () urpla ! net>
Date:       2011-01-31 20:06:54
Message-ID: 201101312106.55109.hpj () urpla ! net
[Download RAW message or body]

On Monday 31 January 2011, 19:33:04 Thomas Mansencal wrote:
> Hello,
>
> I wanted to update my code to use the new Signals / Slots mechanism
> but I'm running into some troubles that I don't manage to understand.
>
> Here is the snippet that I use :
>
>
> def doStuff(self):

Just make this read:

       def doStuff(self, unused = None):

PyQt tries to cope with a small arkwardness of signals and slots here, 
inherited from Qt: Qt handles superfluous arguments to slots gracefully 
(by ignoring them). Due to the dynamic nature, that's not that easy to 
archive properly in python. PyQt resorts to try to call the slot with 
the number of given arguments down to none until it succeeds. 

BTW, it's way easier to use layouts, even in hand written dialogs. 

Otherwise, this forum would have been labeled VisualBasicNonQt, and I 
wouldn't attend here..

Pete
_______________________________________________
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