diff --git a/IPython/terminal/pt_inputhooks/qt.py b/IPython/terminal/pt_inputhooks/qt.py index cf6d11e..2f3f491 100644 --- a/IPython/terminal/pt_inputhooks/qt.py +++ b/IPython/terminal/pt_inputhooks/qt.py @@ -84,3 +84,7 @@ def inputhook(context): _exec(event_loop) finally: notifier.setEnabled(False) + + # This makes sure that the event loop is garbage collected. + # See issue 14240. + event_loop.setParent(None)