[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Very weird behaviour with a new style slot
From: Jeremy Sanders <jeremy () jeremysanders ! net>
Date: 2014-04-06 16:32:42
Message-ID: lhrvj9$gng$1 () ger ! gmane ! org
[Download RAW message or body]
Phil Thompson wrote:
> Qt4 implements signals with optional arguments as multiple signals.
> PyQt considers the default as the version with all arguments specified -
> that's the one you are now connecting to. To connect to the one your old
> code was connecting to do...
>
> button.clicked[()].connect(...
Thanks Phil. That's slightly mind-expanding! Here's a workaround:
def wrap(text):
return lambda: self.doClicked(text)
button.clicked.connect(wrap(t))
Jeremy
_______________________________________________
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