-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Is there a need for enumasint or intasenum? #356
Comments
Hi @zjp thanks for sharing! I would say it make sense to me to have some way to achieve compatibility between things. Just in case, what do you think @ccordoba12 @CAM-Gerlach ? |
Sounds good to me too. |
Sounds good to me to have the conversion functions in the |
One thing we've done in ChimeraX is standardize on using integers instead of enum values as they exist in PyQt6 which poses a challenge because we're still thinking about whether we want to use that or PySide6.
We have two utility functions, qt_enum_as_int and qt_int_as_enum, to help us achieve the flexibility we need. For other packages (PyQt5, pyside2, pyside6) that don't use enums, we test whether the input is a subclass of
enum.Enum
and return the input if it isn't.Does that sound like something that would be useful in compat.py?
The text was updated successfully, but these errors were encountered: