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 7b745ad

Browse filesBrowse files
authored
Merge pull request #16845 from anntzer/pyside2_x11
Fix checking of X11 builds with PySide2.
2 parents 60179ac + fdf796e commit 7b745ad
Copy full SHA for 7b745ad

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+4
-1
lines changed

‎lib/matplotlib/backends/backend_qt5.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import functools
2+
import importlib
23
import os
34
import re
45
import signal
@@ -108,7 +109,9 @@ def _create_qApp():
108109
# check for DISPLAY env variable on X11 build of Qt
109110
if is_pyqt5():
110111
try:
111-
from PyQt5 import QtX11Extras
112+
importlib.import_module(
113+
# i.e. PyQt5.QtX11Extras or PySide2.QtX11Extras.
114+
f"{QtWidgets.__package__}.QtX11Extras")
112115
is_x11_build = True
113116
except ImportError:
114117
is_x11_build = False

0 commit comments

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