I am trying to show message box in pyside python in function called from thread but I got error " Fatal IO error: client killed" and form closes while it shows correctly if I called function normally without thread
code for button click when defining the thread
mythread = Thread(target=self.main_campaign)
mythread.start()
the function as below
def main_campaign(self):
QMessageBox.question(self, 'title', 'text', QMessageBox.Yes | QMessageBox.No)