Show More
@@ -0,0 +1,3 b'' | |||||
|
1 | # shim for code that expects this to live in external. | |||
|
2 | # TODO: issue deprecation warning on import from here? | |||
|
3 | from IPython.lib.qt_for_kernel import * No newline at end of file |
@@ -4,13 +4,13 b' This is the import used for the `gui=qt` or `matplotlib=qt` initialization.' | |||||
4 |
|
4 | |||
5 | Import Priority: |
|
5 | Import Priority: | |
6 |
|
6 | |||
7 |
if Qt |
|
7 | if Qt has been imported anywhere else: | |
8 | use that |
|
8 | use that | |
9 |
|
9 | |||
10 | if matplotlib has been imported and doesn't support v2 (<= 1.0.1): |
|
10 | if matplotlib has been imported and doesn't support v2 (<= 1.0.1): | |
11 | use PyQt4 @v1 |
|
11 | use PyQt4 @v1 | |
12 |
|
12 | |||
13 |
Next, ask |
|
13 | Next, ask QT_API env variable | |
14 |
|
14 | |||
15 | if QT_API not set: |
|
15 | if QT_API not set: | |
16 | ask matplotlib via rcParams['backend.qt4'] |
|
16 | ask matplotlib via rcParams['backend.qt4'] | |
@@ -26,8 +26,7 b' if QT_API not set:' | |||||
26 | except: |
|
26 | except: | |
27 | fallback on PySide |
|
27 | fallback on PySide | |
28 | else: |
|
28 | else: | |
29 | use PyQt @v2 or PySide, depending on QT_API |
|
29 | use what QT_API says | |
30 | because ETS doesn't work with PyQt @v1. |
|
|||
31 |
|
30 | |||
32 | """ |
|
31 | """ | |
33 |
|
32 | |||
@@ -43,6 +42,8 b' _qt_apis = (QT_API_PYSIDE, QT_API_PYQT, QT_API_PYQT5, QT_API_PYQTv1,' | |||||
43 | QT_API_PYQT_DEFAULT) |
|
42 | QT_API_PYQT_DEFAULT) | |
44 |
|
43 | |||
45 | #Constraints placed on an imported matplotlib |
|
44 | # Constraints placed on an imported matplotlib | |
|
45 | # TODO: check that this is still consistent with what matplotlib supports, | |||
|
46 | # in particular with regard to qt5. | |||
46 | def matplotlib_options(mpl): |
|
47 | def matplotlib_options(mpl): | |
47 | if mpl is None: |
|
48 | if mpl is None: | |
48 | return |
|
49 | return |
General Comments 0
You need to be logged in to leave comments.
Login now