make CloseWindow a QDialog instead of a QMainWindow