[PySide] Sender Method Difference

Ed Lipson edlipsongm at gmail.com
Fri Mar 27 15:08:37 CET 2020


Looking at
https://wiki.qt.io/Differences_Between_PySide_and_PyQt#sender.28.29_method_returns_None_when_used_within_a_partial_or_a_lambda

the bug link is not working. I was going to look and see if there was a
workaround
Is there a suggestion for using this model:

self.pushButtonAddPlus.clicked.connect(lambda bname="ap":
self.add_tranp(bname))

self.pushButtonAdd.clicked.connect(lambda bname="a": self.add_tranp(bname))


There is a separate thread on StackExchange about this where the lambda is
"lambda state, bname='a':func(bname)" but the state causes a Type error
because state is missing.
As stated in the Wiki, they work in PyQT

Versions:
Python 3.8.2
PyQt5Designer     5.14.1
PySide2           5.14.1
shiboken2         5.14.1
fbs               0.8.4

Thanks,
Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20200327/827a04f1/attachment.html>


More information about the PySide mailing list