1def closeEvent(self, event):
2 close = QtWidgets.QMessageBox.question(self,
3 "QUIT",
4 "Are you sure want to stop process?",
5 QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No)
6 if close == QtWidgets.QMessageBox.Yes:
7 event.accept()
8 else:
9 event.ignore()