override close event?

1691
3
Jump to solution
12-02-2019 12:31 PM
SeanKim
New Contributor III

Hi,

Is there any method that can override the application's close event? For instance, when a user tried to close the application on Windows, will trigger that can add some logic. After some googling, I found that there's a way to implement in Qt (qt - QtQuick: how to override window close event? - Stack Overflow ) But, can't find any similar method in App / AppLayout QML.

Thanks.

Sean.

0 Kudos
1 Solution

Accepted Solutions
ErwinSoekianto
Esri Regular Contributor

Sean, 

In general QML, you can use the onClosing signal for Qt Window, Window QML Type | Qt Quick 5.13.2 

But, this is not supported within the "App" of the AppStudio AppFramework. This is a good enhancement, we are looking into a way to add this into AppStudio AppFramework that would support all platforms. If this is a requirement for your app, I would recommend submitting a formal Enhancement request through Esri Technical Support‌, so that we can track it. 

Thank you,

Erwin

View solution in original post

0 Kudos
3 Replies
ErwinSoekianto
Esri Regular Contributor

Sean, 

In general QML, you can use the onClosing signal for Qt Window, Window QML Type | Qt Quick 5.13.2 

But, this is not supported within the "App" of the AppStudio AppFramework. This is a good enhancement, we are looking into a way to add this into AppStudio AppFramework that would support all platforms. If this is a requirement for your app, I would recommend submitting a formal Enhancement request through Esri Technical Support‌, so that we can track it. 

Thank you,

Erwin

0 Kudos
ErwinSoekianto
Esri Regular Contributor

Sean, 

We found something, but I think this might not be what you are looking for. This will not override the close event, but this is an event listener when the app is closed. 

Thank you,

Erwin. 

0 Kudos
SeanKim
New Contributor III

Thanks for your answer, Erwin.

I will submit this through support as you guided due to it is one of our app's requirement.

Thanks,

Sean

0 Kudos