Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f85e322

Browse files
committed
[DOC] Add documentation for the QT_API environment variable.
1 parent 5ce866c commit f85e322

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

doc/faq/usage_faq.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,20 @@ macosx Cocoa rendering in OSX windows
284284
.. _TkInter: http://wiki.python.org/moin/TkInter
285285
.. _PyQt4: http://www.riverbankcomputing.co.uk/software/pyqt/intro
286286

287+
How do I select PyQt4 or PySide?
288+
========================================
287289

290+
You can choose either PyQt4 or PySide when using the `qt4` backend by setting
291+
the appropriate value for `backend.qt4` in your :file:`matplotlibrc` file. The
292+
default value is `PyQt4`.
293+
294+
The setting in your :file:`matplotlibrc` file can be overridden by setting the
295+
`QT_API` environment variable to either `pyqt` or `pyside` to use `PyQt4` or
296+
`PySide`, respectively.
297+
298+
Since the default value for the bindings to be used is `PyQt4`,
299+
:mod:`matplotlib` first tries to import it, if the import fails, it tries to
300+
import `PySide`.
288301

289302
.. _interactive-mode:
290303

0 commit comments

Comments
 (0)