From b23396c85a8ca03229d84245b0c94128ea11c1d5 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 10 Aug 2014 19:08:39 -0400 Subject: [PATCH] BUG : modified logic on starting qApp when working in ipython, it seems that _create_qApp is not called until the first time that a figure is made, but ipython has already started up the QApplication for us (I think) so that we never set backend_qt5 to be non-None. This seems to mostly be ok, but breaks `plt.pause`. --- lib/matplotlib/backends/backend_qt5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/backends/backend_qt5.py b/lib/matplotlib/backends/backend_qt5.py index 561da2223be5..369a82416f2a 100644 --- a/lib/matplotlib/backends/backend_qt5.py +++ b/lib/matplotlib/backends/backend_qt5.py @@ -125,13 +125,13 @@ def _create_qApp(): """ Only one qApp can exist at a time, so check before creating one. """ - if QtWidgets.QApplication.startingUp(): + + if qApp is None: if DEBUG: print("Starting up QApplication") global qApp app = QtWidgets.QApplication.instance() if app is None: - # check for DISPLAY env variable on X11 build of Qt if hasattr(QtGui, "QX11Info"): display = os.environ.get('DISPLAY')