how to call function when clicke with QPushButton in python code example Example: pyqt button clicked connect button.clicked.connect(lambda:self.myMethod())