Calling a function and having it call multiple times
问题 I'm having an issue in PyQt5 where if I some of my functions, it calls it however many times I've called it so far. I'll try to water down to relevant code. class MainWindow(QtWidgets.QMainWindow, UI.MainUI.Ui_MainWindow): """The Main Window where everything happens""" def __init__(self, parent=None): """Initializes (Don't use partial as most of the variables aren't created yet)""" super(MainWindow, self).__init__(parent) self.setupUi(self) self.btn_buy_ship.clicked.connect( lambda: self.game