I am using signal/slot mechanism with PyQt5 and Python3.6.
I know how to retrieve (in the slot function) the "default" argument linked to the emitted signal:
self.myQLineEdit.textEdited.connect(self.my_slot_function)
def my_slot_function(self, text: str) {
print(text)
}
I also know how to send a custom argument to my slot function:
my_param = 123
self.myQLineEdit.textEdited.connect(lambda: self.my_slot_function(my_param))
def my_slot_function(self, param: int) {
print(str(param))
}
But I don't know how to send a custom argument while keeping the original "default" argument.
It would be something like:
my_param = 123
self.myQLineEdit.textEdited.connect(lambda: self.my_slot_function(default, my_param))
def my_slot_function(self, text: str, param: int) {
print(text)
print(str(param))
}