Subclassing QMainWindow and override close method