def is_event_loop_running_qt4(app=None):
    """Is the qt4 event loop running."""
    if app is None:
        app = get_app_qt4([''])
    if hasattr(app, '_in_event_loop'):
        return app._in_event_loop
    else:
        # Does qt4 provide a other way to detect this?
        return False
Is the qt4 event loop running.