dict.__setitem__(rcParams, "backend.qt4", QT_API_PYQTv2)
elif QT_API_ENV == "pyside":
dict.__setitem__(rcParams, "backend.qt4", QT_API_PYSIDE)
QT_API = dict.__getitem__(rcParams, "backend.qt4")
// A non-Qt backend was selected but we still got there (possible, e.g., when
// fully manually embedding Matplotlib in a Qt app without using pyplot).
else:
try:
After Change
// only override the binding, not the backend (in other words, we check that the
// requested backend actually matches).
elif rcParams["backend"] in ["Qt5Agg", "Qt5Cairo"]:
if QT_API_ENV in ["pyqt5", "pyside2"]:
QT_API = _ETS[QT_API_ENV]
else:
QT_API = None
elif rcParams["backend"] in ["Qt4Agg", "Qt4Cairo"]:
if QT_API_ENV in ["pyqt4", "pyside"]:
QT_API = _ETS[QT_API_ENV]
else: