how to catch close event in this program? [pyqt]

Printable View