Showing Qml Message Diaglog while closing qml application (solved)
-
Hello,
I want to show a qml message dialog and let user choose "saving some thing" while exit qml application . I try to show the message diaglog at Component.onDestruction or ApplicationWindow.onClosing.
With: Component.onDestruction: no message dialog was shown.
With: ApplicationWindow.onClosing: the message diaglog show but the application window disappeared
Could you please help me ?
Thank you!
-
Hi,
IMO Component.onDestruction wont be useful here.
bq. With: ApplicationWindow.onClosing: the message diaglog show but the application window disappeared
Did you set close.accepted = false before calling the MessageDialog in onClosing handler?
-
Hi p3c0,
I forgot this. Thanks to your guide, I can do it.