You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FIX: ensure that qt5agg and qt5cairo backends actually use qt5
Because the code in qt_compat tries qt6 bindings first, backend_qt supports
both Qt5 and Qt6, and the qt5 named backends are shims to the generic Qt
backend, if you imported matplotlib.backends.backend_qt5agg,
matplotlib.backends.backend_qt5cairo, or matplotlib.backends.backend_qt5, and
1. had PyQt6 or pyside6 installed
2. had not previously imported a Qt5 binding
Then you will end up with a backend that (by name) claims to be Qt5, but will
be using Qt6 bindings. If you then subsequently import a Qt6 binding and try
to embed the canvas it will fail (due to being Qt6 objects not Qt5 objects!).
Additional changes to qt_compat that only matters if
1. rcparams['backend'] is set to qt5agg or qt5agg
2. QT_API env is not set
3. the user directly import matplotlib.backends.qt_compat
This will likely only affect users who are using Matplotlib as an
qt-shim implementation.
closes#21998
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
0 commit comments