MCPcopy Index your code
hub / github.com/ipython/ipython / is_event_loop_running_qt4

Function is_event_loop_running_qt4

IPython/lib/guisupport.py:122–136  ·  view source on GitHub ↗

Is the qt event loop running.

(app=None)

Source from the content-addressed store, hash-verified

120 return app
121
122def is_event_loop_running_qt4(app=None):
123 """Is the qt event loop running."""
124 # New way: check attribute on shell instance
125 ip = get_ipython()
126 if ip is not None:
127 return ip.active_eventloop and ip.active_eventloop.startswith('qt')
128
129 # Old way: check attribute on QApplication singleton
130 if app is None:
131 app = get_app_qt4([""])
132 if hasattr(app, '_in_event_loop'):
133 return app._in_event_loop
134 else:
135 # Does qt provide a other way to detect this?
136 return False
137
138def start_event_loop_qt4(app=None):
139 """Start the qt event loop in a consistent manner."""

Callers 1

start_event_loop_qt4Function · 0.85

Calls 2

get_ipythonFunction · 0.90
get_app_qt4Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…