@@ -232,19 +232,23 @@ for more details.
232232
233233.. _QT_API-usage :
234234
235- How do I select PyQt5 or PySide2 ?
236- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
235+ How do I select the Qt implementation ?
236+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
237237
238- The :envvar: `QT_API ` environment variable can be set to either ``pyqt5 `` or
239- ``pyside2 `` to use ``PyQt5 `` or ``PySide2 ``, respectively.
238+ The QtAgg and QtCairo backends support both Qt 5 and 6, as well as both Python
239+ bindings (`PyQt `_ or `Qt for Python `_, a.k.a. PySide). If any binding has
240+ already been loaded, then it will be used for the Qt backend. Otherwise, the
241+ first available binding is used, in the order: PyQt6, PySide6, PyQt5, PySide2.
240242
241- Since the default value for the bindings to be used is ``PyQt5 ``, Matplotlib
242- first tries to import it. If the import fails, it tries to import
243- ``PySide2 ``.
243+ The :envvar: `QT_API ` environment variable can be set to override the search
244+ when nothing has already been loaded. It may be set to (case-insensitively)
245+ PyQt6, PySide6, PyQt5, or PySide2 to pick the version and binding to use. If
246+ the chosen implementation is unavailable, the Qt backend will fail to load
247+ without attempting any other Qt implementations.
244248
245249Using non-builtin backends
246250--------------------------
247251More generally, any importable backend can be selected by using any of the
248252methods above. If ``name.of.the.backend `` is the module containing the
249253backend, use ``module://name.of.the.backend `` as the backend name, e.g.
250- ``matplotlib.use('module://name.of.the.backend') ``.
254+ ``matplotlib.use('module://name.of.the.backend') ``.
0 commit comments