Closing all windows #4863
-
|
I'm positive this is probably covered somewhere, but couldn't find it. Lets say my app have a main window, and then other windows that were created as a webview and/or from a command. What's the way to go so when I close the main window actually all the others windows that were created close too? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
That depends on if you want to exit the whole process, or just close the other windows but keeping the event loop running (for example if you want to keep it running in the system tray). For the first version you'd listen to the CloseRequested event, check if it's the main window and then use For the second version, you'd have to keep track of the opened windows (their labels) yourself and then close them manually. |
Beta Was this translation helpful? Give feedback.
That depends on if you want to exit the whole process, or just close the other windows but keeping the event loop running (for example if you want to keep it running in the system tray).
For the first version you'd listen to the CloseRequested event, check if it's the main window and then use
exitjs / rust to close everything.For the second version, you'd have to keep track of the opened windows (their labels) yourself and then close them manually.