I'm building one qml application and I printing console log's every where but if I minimize application and try to close from taskbar how will I capture that close event in console log. I'm using QT 5.13 version.
Component.onCompleted: {
Qt.application.activeChanged.connect(function() {
if (!Qt.application.active) {
console.log("Application closed from taskbar")
}
})
}
I tried this above code but this code is printing console log based on visibility if i minimize the application then it's printing which is wrong
Application should emit
aboutToQuitsignal when it is about to quit.To QML it is exposed as
Applicationsingleton that you can use like: