add close event of QWidget