I have a function which has default keyword arguments. I'm having trouble implementing this as I keep getting an error that if my signal has two arguments then I need to pass both arguments. Is there any way around this?
class Controller(QWidget):
trigger = pyqtSignal(str, str)
def __init__(self):
self.trigger.connect(self.myfunc)
@pyqtSlot(str, str)
def function(argument, optional_argument=''):
do something
c = Controller()
c.trigger.emit('Hello', 'World') # This works
c.trigger.emit('Hello') # This fails and says I need 2 arguments