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

Skip to content

Commit 5336d0e

Browse files
committed
FIX: restore matplotlib.backends.backend_qt5.qApp
This has to be a module-level getattr so that we can proxy to the current state of backend_qt.
1 parent 48db078 commit 5336d0e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/backends/backend_qt5.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@
99
FigureCanvasBase, FigureManagerBase, MouseButton, NavigationToolbar2,
1010
TimerBase, ToolContainerBase, figureoptions, Gcf
1111
)
12+
from . import backend_qt as _backend_qt # noqa
1213

1314

1415
@_BackendQT.export
1516
class _BackendQT5(_BackendQT):
1617
pass
18+
19+
20+
def __getattr__(name):
21+
if name == 'qApp':
22+
return _backend_qt.qApp
23+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

0 commit comments

Comments
 (0)