Description
In some circumstances it may be useful to specify the Qt version qtpy
should use without without specifying which implementation to use. Currently it is only possible leave it up to qtpy
to decide or to exactly specify the API using the QT_API
environment variable.
In my particular use case I would need this feature in an application using QtPdf
(which is only available in Qt6) but am indifferent whether PyQt6
or PySide6
should be used. I am aware that it is possible to set QT_API=pyqt6
and pyqt
will fall back to PySide6
when PyQt6
is not available but I would consider this a bit unsatisfactory since it will trigger a warning for an unproblematic case, the actual intention does not become clear when looking at the code and it does not work when only Qt5
should be used instead.
This feature could be realized by allowing to set QT_API
to a Qt version , e.g. QT_API=Qt6
or by allowing to set QT_API
to a list of values, e.g. QT_API=pyqt6,pyside6
.