def start_qtapp(app=None):
 if (app is None):
  app = init_qtapp()
 if (not is_event_loop_running(app)):
  app._in_event_loop = True
  app.exec_()
  app._in_event_loop = False
 else:
  app._in_event_loop = True

def start_qtapp ( app = None ) : if ( app is None ) : app = init_qtapp ( ) if ( not is_event_loop_running ( app ) ) : app . _in_event_loop = True app . exec_ ( ) app . _in_event_loop = False else : app . _in_event_loop = True
start qt mainloop .