Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use standard method for closing QApp when last window is closed. #26646

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 30, 2023

setQuitOnLastWindowClosed(True) should be equivalent to lastWindowClosed.connect(quit), but is more introspectable (e.g. third-parties can check the value of quitOnLastWindowClosed()).

AFAICT the code used lastWindowClosed.connect(quit) because it dates back to Qt3, where setQuitOnLastWindowClosed did not exist yet.

PR summary

PR checklist

setQuitOnLastWindowClosed(True) should be equivalent to
lastWindowClosed.connect(quit), but is more introspectable (e.g.
third-parties can check the value of quitOnLastWindowClosed()).

AFAICT the code used lastWindowClosed.connect(quit) because it dates
back to Qt3, where setQuitOnLastWindowClosed did not exist yet.
@timhoffm timhoffm added this to the v3.8.0 milestone Aug 30, 2023
@timhoffm timhoffm merged commit 14aa02b into matplotlib:main Aug 30, 2023
39 of 40 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Aug 30, 2023
QuLogic added a commit that referenced this pull request Aug 31, 2023
…646-on-v3.8.x

Backport PR #26646 on branch v3.8.x (Use standard method for closing QApp when last window is closed.)
@anntzer anntzer deleted the qolwc branch August 31, 2023 05:13
@ksunden ksunden mentioned this pull request Sep 15, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants