When I implements the function that is executed when a button is clicked, the code is like this:
self.connect(btnBrowse, SIGNAL("clicked()"), self.browseFile)
and I implement the function browseFile
def browseFile(self):
But when i am inside the method browseFile, I don’t have information about the button being clicked, because I want to implement just one function browseFile for many buttons. how can I do to have more information the slot, for example to have my function looks like this:
def browseFile(self, option):
Thanks
Connect to a lambda (or use functools.partial).
Also note the use of new style syntax, which is much more readable and pythonic.