Skip to content

Fix compatibility with Matplotlib 3.7 and Qt6. #62

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

Closed
wants to merge 1 commit into from

Conversation

anntzer
Copy link
Collaborator

@anntzer anntzer commented Apr 15, 2023

  • enum scoping change.
  • exec vs. exec_.
  • Matplotlib no longer exports _getSaveFileName (only PyQt4 required a separate _getSaveFileName because it called that function getSaveFileNameAndFilter instead; let's not try to support qt4 anymore).  Also, PyQt and PySide use different parameter names for this function; pass parameters positionally instead.
  • addAction parameter order changed between qt5 and qt6, but we can call it in a way that's compatible with everyone by using setShortcut instead.
  • QAction moved between qt5 and qt6 but we don't need to explicitly instantiate it; we can use addAction instead to do so.

- enum scoping change.
- exec vs. exec_.
- Matplotlib no longer exports _getSaveFileName (only PyQt4 required a
  separate _getSaveFileName because it called that function
  getSaveFileNameAndFilter instead; let's not try to support qt4
  anymore).  Also, PyQt and PySide use different parameter names for
  this function; pass parameters positionally instead.
- addAction parameter order changed between qt5 and qt6, but we can call
  it in a way that's compatible with everyone by using setShortcut
  instead.
- QAction moved between qt5 and qt6 but we don't need to explicitly
  instantiate it; we can use addAction instead to do so.
@mfisher87
Copy link
Collaborator

I'd like to work on getting this merged in the next couple of weeks and hopefully do a release with qt6 and mpl3.7 support by the end of that period.

@@ -1050,7 +1053,7 @@ def main(argv):
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)

app.exec_()
(getattr(app, "exec", None) or getattr(app, "exec_"))()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just app.exec() because we're dropping support for Qt4. What do you think?

mfisher87 added a commit to mfisher87/viscm that referenced this pull request Jun 11, 2023
@mfisher87
Copy link
Collaborator

This change is integrated in to #75 . Thank you!

@mfisher87 mfisher87 closed this Jun 12, 2023
@anntzer anntzer deleted the up branch June 12, 2023 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants