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