Answers for "pyqt5 close event"

0

pyqt5 close event

def closeEvent(self, event):
            close = QtWidgets.QMessageBox.question(self,
                                         "QUIT",
                                         "Are you sure want to stop process?",
                                         QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
            if close == QtWidgets.QMessageBox.Yes:
                event.accept()
            else:
                event.ignore()
Posted by: Guest on March-05-2021

Python Answers by Framework

Browse Popular Code Answers by Language