Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2d44b95

Browse filesBrowse files
authored
Update qt_compat.py
Perform proper test.
1 parent 3320e23 commit 2d44b95
Copy full SHA for 2d44b95

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎lib/matplotlib/backends/qt_compat.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/qt_compat.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
"pyqt": QT_API_PYQTv2, "pyside": QT_API_PYSIDE,
3131
None: None}
3232
# First, check if anything is already imported.
33-
if "PyQt5" in sys.modules:
33+
if "PyQt5.QtCore" in sys.modules:
3434
QT_API = QT_API_PYQT5
35-
elif "PySide2" in sys.modules:
35+
elif "PySide2.QtCore" in sys.modules:
3636
QT_API = QT_API_PYSIDE2
37-
elif "PyQt4" in sys.modules:
37+
elif "PyQt4.QtCore" in sys.modules:
3838
QT_API = QT_API_PYQTv2
39-
elif "PySide" in sys.modules:
39+
elif "PySide.QtCore" in sys.modules:
4040
QT_API = QT_API_PYSIDE
4141
# Otherwise, check the QT_API environment variable (from Enthought). This can
4242
# only override the binding, not the backend (in other words, we check that the

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.