How to react/persist UI state when the user quits the main appplication? #6392
Answered
by
Vadoola
PanCakeConnaisseur
asked this question in
Q&A
-
Can I somehow react (in Rust) to the user closing the main window, i.e. clicking the X of the window manager or pressing ALT+F4? I want to persist the UI state. The alternative AFAICS would be to persist after each change, but the former seems to be more "efficient", I am not sure though. I would appreciate an opinion on what the best-practice is for this scenario. |
Beta Was this translation helpful? Give feedback.
Answered by
Vadoola
Sep 30, 2024
Replies: 1 comment 1 reply
-
I believe this is what you are looking for: https://releases.slint.dev/1.8.0/docs/rust/slint/struct.window#method.on_close_requested |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
PanCakeConnaisseur
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe this is what you are looking for: https://releases.slint.dev/1.8.0/docs/rust/slint/struct.window#method.on_close_requested