Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.1.1, 5.7.1, 5.8.0, 5.9.7, 5.12.0 Beta 4, 5.12.3
Description
import QtQuick 2.1 import QtQuick.Window 2.1 import QtQuick.Controls 1.0 Window { title: qsTr("Hello World") width: 640 height: 480 property bool __canClose: false onClosing: { close.accepted = __canClose; } Button { text: qsTr("Allow close") anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter onClicked: __canClose = true; } }
The Window doesn't send a closing event for Cmd+Q but it does if you click the red x close button.
Attachments
Issue Links
- is required for
-
QTBUG-59782 Qt.quit() exits immediately without sending a QCloseEvent
-
- Closed
-
- relates to
-
QTBUG-72013 [macOS] can't prevent an application to quit on Command+Q
-
- Closed
-
-
QTBUG-35390 onClosing event of ApplicationWindow not invoked via close()
-
- Closed
-
-
QTBUG-40093 In QML onClosing() signal not fires when Window.close() used
-
- Closed
-
-
QTBUG-43344 macOS: Regression: closeEvent called twice (still not fixed)
-
- Closed
-
-
QTBUG-45262 close.accepted = false ignored when QCoreApplication::quit() is called
-
- Closed
-
- resulted from
-
QTBUG-31019 need a way to intercept closing of a Window in Qt Quick
-
- Closed
-
For Gerrit Dashboard: QTBUG-33235 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
194579,4 | Let QWindows ignore close events | 5.9 | qt/qtbase | Status: NEW | -2 | 0 |
190061,2 | QGuiApplication: send each QWindow the QCloseEvent, respect any veto | dev | qt/qtbase | Status: ABANDONED | -1 | 0 |
195912,11 | Move application close handling to QGuiApplication | dev | qt/qtbase | Status: DEFERRED | -2 | 0 |
277640,13 | Deliver Quit event when calling QCoreApplication::quit() | dev | qt/qtbase | Status: MERGED | +2 | 0 |
277851,1 | Teach QCoreApplication::quit() to involve platform in termination | 5.14 | qt/qtbase | Status: ABANDONED | 0 | 0 |
312898,3 | Plumb application quit through platform plugin | dev | qt/qtbase | Status: MERGED | +2 | 0 |