diff options
Diffstat (limited to 'src/silx/gui/qt/__init__.py')
-rw-r--r-- | src/silx/gui/qt/__init__.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/silx/gui/qt/__init__.py b/src/silx/gui/qt/__init__.py index bc75041..675a178 100644 --- a/src/silx/gui/qt/__init__.py +++ b/src/silx/gui/qt/__init__.py @@ -25,11 +25,12 @@ - `PyQt5 <http://pyqt.sourceforge.net/Docs/PyQt5/>`_ - `PySide6 <https://pypi.org/project/PySide6/>`_ -- `PySide2 <https://pypi.org/project/PySide2/>`_ - `PyQt6 <https://pypi.org/project/PyQt6/>`_ -If a Qt binding is already loaded, it will use it, otherwise the different -Qt bindings are tried in this order: PyQt5, PySide6, PySide2, PyQt6. +If a Qt binding is already loaded, it will be used. +If the `QT_API` environment variable is set to one of the supported Qt bindings +(case insensitive), this binding is loaded if available, otherwise the +different Qt bindings are tried in this order: PyQt5, PySide6, PyQt6. The name of the loaded Qt binding is stored in the BINDING variable. @@ -48,7 +49,8 @@ see `qtpy <https://pypi.org/project/QtPy/>`_. """ from ._qt import * # noqa -if BINDING in ('PySide2', 'PySide6'): + +if BINDING == "PySide6": # Import loadUi wrapper - from ._pyside_dynamic import loadUi # noqa + from ._pyside_dynamic import loadUi # noqa from ._utils import * # noqa |