qtpy
qtpy copied to clipboard
PR: Add `QT_VERSION` environment variable
This PR adds the option to specify the Qt version qtpy will use via the QT_VERSION environment variable and should resolve #476.
If the QT_VERSTION but not the QT_API environment variable is set, the API is selected based on QT_VERSTION (and follows the usual order PyQt5 -> PySide2 -> PyQt6 -> PySide6 if a binding is not installed). If both environment variables are set, QT_API takes precedence. If the version cannot be satisfied or the environment variables are incompatible warnings are triggered.
Please have an extra eye on the test when reviewing as I am not perfectly sure it will behave correctly in the CI environment.