QCloseEvent should be included in "mainwindow.h"
The MainWindow class overrides closeEvent(). However, the library QCloseEvent is not included. For the time being, this is not a bug. However, it could cause issues in the future. Therefore, the following line should be added:
#include <QCloseEvent>