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

Skip to content

Commit 468d5d4

Browse files
committed
fallback to pyqt5 if present
1 parent 0015c78 commit 468d5d4

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

IPython/external/qt_for_kernel.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
else: (matplotlib said nothing)
2020
# this is the default path - nobody told us anything
2121
try in this order:
22-
PyQt default version, PySide
22+
PyQt default version, PySide, PyQt5
2323
else:
2424
use what QT_API says
2525
@@ -83,8 +83,7 @@ def get_options():
8383
qt_api = os.environ.get('QT_API', None)
8484
if qt_api is None:
8585
#no ETS variable. Ask mpl, then use default fallback path
86-
# TODO: should Qt5 be on the fallback path if there is no Qt4 API?
87-
return matplotlib_options(mpl) or [QT_API_PYQT_DEFAULT, QT_API_PYSIDE]
86+
return matplotlib_options(mpl) or [QT_API_PYQT_DEFAULT, QT_API_PYSIDE, QT_API_PYQT5]
8887
elif qt_api not in _qt_apis:
8988
raise RuntimeError("Invalid Qt API %r, valid values are: %r" %
9089
(qt_api, ', '.join(_qt_apis)))

0 commit comments

Comments
 (0)