Thanks for the prompt response. I read the JIRA, and got these to both work
# self.pushButtonAdd.clicked[bool].connect(lambda _, bflg='A': self.add_tranb(bflg)) # self.pushButtonAddPlus.clicked[bool].connect(lambda _, bflg='AP': self.add_tranb(bflg)) # QObject.connect(self.pushButtonAdd, SIGNAL('clicked()'), # lambda bflg='A': self.add_tranb(bflg)) # QObject.connect(self.pushButtonAdd, SIGNAL('clicked()'), # lambda bflg='AP': self.add_tranb(bflg)) It it getting the the edge of my Python skills to understand, but I understand the C++ signature points. I've time on my hands since being let go at the beginning of March, and now with SARS COV2 I can't even go the the gym. So I'm coding little projects. I appreciate the time you take to respond. Thanks, Ed On Fri, Mar 27, 2020 at 11:16 AM Cristián Maureira-Fredes < cristian.maureira-fre...@qt.io> wrote: > Hello, > > On 3/27/20 3:08 PM, Ed Lipson wrote: > > 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 > (snip) > > 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 > > You can find the discussion we had on the same > topic here: https://bugreports.qt.io/browse/PYSIDE-909 > > In a nutshell, > the signals are selected by the arguments, > the only variation of clicked is clicked(bool), > so when you pass an argument it assumed is that one > and it fails to convert your str to bool. > The same with more than 1 argument, it will fail > to connect to the signal. > > If you really need something like a clicked(str) > signal, I recommend you create your own personalized > signal. > > If you still believe that behaviour should > be accepted, please open a Suggestion in our JIRA system. > > Cheers > > -- > Dr. Cristian Maureira-Fredes > R&D Manager > > The Qt Company GmbH > Erich-Thilo-Str. 10 > D-12489 Berlin > > Geschäftsführer: Mika Pälsi, > Juha Varelius, Mika Harjuaho > Sitz der Gesellschaft: Berlin, > Registergericht: Amtsgericht > Charlottenburg, HRB 144331 B > _______________________________________________ > PySide mailing list > PySide@qt-project.org > https://lists.qt-project.org/listinfo/pyside >
_______________________________________________ PySide mailing list PySide@qt-project.org https://lists.qt-project.org/listinfo/pyside