Currently trying to build a gui.Whenever i try to exit the gui using either the button i created or the exit button on the os it takes some time and at the end the console shows Restarting kernel... without any other msg.I am using Spyder with Python 3.9.Btw i am not using sys.exit() i saw on some other questions that i was the problem kind of.. i really don't get it..The code :
class Class_Thread(filex.Classx,QThread):def run(self): self.setTerminationEnabled(True)""" the code the gui runs"""class UI(QMainWindow): def __init__(self): super(UI,self).__init__() #load the UI file uic.loadUi("test.ui", self) self.Class_instance = Class_Thread() #define the widgets self.start_button = self.findChild(QPushButton,"start_button") self.reset_button = self.findChild(QPushButton,"reset") self.exit_button = self.findChild(QPushButton,"exit") self.start_button.clicked.connect(self.start_check) self.reset_button.clicked.connect(self.reset_code) self.exit_button.clicked.connect(QtCore.QCoreApplication.instance().quit) #show the app self.show() def reset_code(self): self.Class_instance.quit() self.reset_button.setEnabled(False) self.start_button.setEnabled(True) def start_check(self): self.reset_button.setEnabled(True) self.start_button.setEnabled(False) self.CC_Instance.start()app = QApplication(sys.argv)UIWindow = UI()UIWindow.show()UIWindow.activateWindow()app.exec_()Please help me put!! I have a project i need to deliver!Thank you!