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

Replace PyQt5 with qtpy #321

Closed
4 tasks done
ElpadoCan opened this issue May 5, 2023 · 0 comments
Closed
4 tasks done

Replace PyQt5 with qtpy #321

ElpadoCan opened this issue May 5, 2023 · 0 comments
Labels
🎈 Enhancement Enhancement to an existing feature

Comments

@ElpadoCan
Copy link
Collaborator

ElpadoCan commented May 5, 2023

Description:

Replace PyQt5 dependency with qtpy, which provides support for PyQt5, PyQt6, PySide6, PySide2 using the Qt5 layout.

For example instead of from PyQt5.QtCore import Qt we can just do from qtpy.QtCore import Qt while having any of the Qt bindings library installed.

This is particularly useful on Apple Silicon CPUs where it could be easier to install PyQt6 instead of PyQt5.

To do:

  • Replace all imports from PyQt5. with from qtpy.
  • Correct imports QtCore.pyqtSignal, QtCore.pyqtSlot and QtCore.pyqtProperty (available on PyQt5/6) since they are exposed as QtCore.Signal, QtCore.Slot and QtCore.Property, respectively.
  • Remove PyQt5 dependency and add additional extras_require with pyqt5 (to use PyQt5), pyside2 (to use PySide2) pyqt6 (to use PyQt6) pyside6 (to use PySide6).`
  • When running acdc for the first time, if a GUI library is missing, ask the user (in the terminal) which library they want to install. Default to PyQt5 on Windows and PyQt6 on Apple Silicon Mac.
@ElpadoCan ElpadoCan added the 🎈 Enhancement Enhancement to an existing feature label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎈 Enhancement Enhancement to an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant