Fix MainWindow not propagating close events to docked widgets

Nested FloatingWindows already supported it, so make it consistent.

Personal take: In a non-docking world, users can override their
main window close event and prevent a close, to save a document
or such. However, in a docking world, the main window developer
won't know which widgets are docked, so forwarding needs to happen,
as some might have documents to save.
This commit is contained in:
Sergio Martins
2022-03-09 15:24:07 +00:00
parent 01cc915734
commit 7db9938b85
6 changed files with 20 additions and 2 deletions

View File

@@ -57,6 +57,7 @@ public:
void setCenterWidgetMargins(const QMargins &margins);
protected:
void closeEvent(QCloseEvent *) override;
void resizeEvent(QResizeEvent *) override;
QRect centralAreaGeometry() const override;