Skip to content

Requesting the window to be closed? #5465

Answered by ogoffart
npwoods asked this question in Q&A
Discussion options

You must be logged in to vote

on_close_requested() is to be used when the close request comes from the window manager.
You can simulate this with a slint::platform::WindowEvent::CloseRequested event. But I wouldn't recommand to do that for the "Exit" menu item. For that, i'd recommend that the callback handler for Exit and the for on_close_requested call the same helper function.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by npwoods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants