qtpy icon indicating copy to clipboard operation
qtpy copied to clipboard

PR: Add `QT_VERSION` environment variable

Open Bzero opened this issue 1 year ago • 1 comments

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.

Bzero avatar Apr 13 '24 15:04 Bzero

Coverage Status

coverage: 96.781%. remained the same when pulling b8c9d20e508b66d269a250ad22f9b7c9c64ca139 on Bzero:add_QT_VERSION_environment_variable into 3238de7a3e038daeb585c1a76fd9a0c4baf22f11 on spyder-ide:master.

coveralls avatar Apr 13 '24 15:04 coveralls