Is the qt event loop running.
(app=None)
| 120 | return app |
| 121 | |
| 122 | def 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 | |
| 138 | def start_event_loop_qt4(app=None): |
| 139 | """Start the qt event loop in a consistent manner.""" |
no test coverage detected
searching dependent graphs…