I have Gui with Pyqt5. I have a few QLineEdit in my Gui, and when you click the button it submits the value of those variables. It's working fine. I also have a function which clears all the LineEdits. It's working fine too.
But I want that when I press Submit the variables get submitted and then cleared. Can I run a function in another function without writing it new (because then I would have to change both everytime).
My button is like this:
submitButton = QPushButton("Text", self)
submitButton.triggered.connect(self.submit)
To achieve this can I just do it like that?
submitButton = QPushButton("Text", self)
submitButton.triggered.connect(self.submit, self.clear)
PS: If there is a typo in my code don't worry cause my code in general is fine. I just wrote it down on my phone.