From df93d356df528a4449be3caa72dfc58fc91132dd Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Mon, 6 May 2013 16:36:20 +0200 Subject: Don't destroy the window if the QCloseEvent wasn't accepted MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Stephen Kelly --- src/gui/kernel/qwindow.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/kernel/qwindow.h') 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 *); -- cgit v1.2.3