QProcess's finished signal returns exitCode as a parameter. I am trying to create a lambda function to connect this signal, but I can't figure out how to send additional arguments to it:
b=2
process.finished.connect(lambda a=a:self.onFinish(a))
def onFinish(self,exitCode,a):
#do something
The error I get is:
TypeError: onFinish() takes exactly 3 arguments (2 given)
I was hoping that the exitStatus would automatically get propagated to the lambda function, but it doesn't seem to.
The above code does not seem to work.