how to start method when pressing button pyqt5 code example Example: pyqt button clicked connect button.clicked.connect(lambda:self.myMethod())