Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.1.0 , 5.2.0 RC1
-
None
-
OSX 10.9, Win 8.1 x64
Description
If a window is closed via the close() function from QML, the onClosing event is not invoked. If the window is closed via the chrome([x] button), the event is raised as expected.
Bar.java
import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Window 2.0 ApplicationWindow { title: qsTr("Hello World") width: 640 height: 480 property ApplicationWindow win : ApplicationWindow { title: "hello" Button { text: "Something" anchors.centerIn: parent } onClosing: console.log("Called") } Button { anchors.left: parent.left text: "Open" onClicked: win.show(); } Button { anchors.right: parent.right text: "Close" onClicked: { win.close() } } }
- Click the "Open" button to open a window.
- Close via the window chrome [x] button in the new window and you'll see the console log output
- Close the new window via the "Close" button in the parent. Console log output is not currently raised
Attachments
Issue Links
- relates to
-
QTBUG-33235 OSX: QQuickWindow doesn't get a closeEvent on Cmd+Q
- Closed