diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-05-06 16:36:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-07 14:30:26 +0200 |
commit | df93d356df528a4449be3caa72dfc58fc91132dd (patch) | |
tree | 3479c1ecb45cc8ed428759d458ac907d4d5f6be2 /src/gui/kernel/qwindow.h | |
parent | 1b913793237ea7d25380ac5634ae419806f8645f (diff) |
Don't destroy the window if the QCloseEvent wasn't accepted
It's possible to override event() to receive the QCloseEvent and
do event->ignore() to prevent the window from closing.
Task-number: QTBUG-31019
Change-Id: I9abed47fca02a002b78727f98d678a824854adfc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/gui/kernel/qwindow.h')
-rw-r--r-- | src/gui/kernel/qwindow.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h index 79f90f2c62..efdfd497a6 100644 --- a/src/gui/kernel/qwindow.h +++ b/src/gui/kernel/qwindow.h @@ -330,6 +330,7 @@ protected: virtual void showEvent(QShowEvent *); virtual void hideEvent(QHideEvent *); + // TODO Qt 6 - add closeEvent virtual handler virtual bool event(QEvent *); virtual void keyPressEvent(QKeyEvent *); |