Show More
@@ -110,13 +110,15 b' def get_app_qt4(*args, **kwargs):' | |||
|
110 | 110 | from PyQt4 import QtGui |
|
111 | 111 | app = QtGui.QApplication.instance() |
|
112 | 112 | if app is None: |
|
113 | if not args: | |
|
114 | args = ([''],) | |
|
113 | 115 | app = QtGui.QApplication(*args, **kwargs) |
|
114 | 116 | return app |
|
115 | 117 | |
|
116 | 118 | def is_event_loop_running_qt4(app=None): |
|
117 | 119 | """Is the qt4 event loop running.""" |
|
118 | 120 | if app is None: |
|
119 | app = get_app_qt4() | |
|
121 | app = get_app_qt4(['']) | |
|
120 | 122 | if hasattr(app, '_in_event_loop'): |
|
121 | 123 | return app._in_event_loop |
|
122 | 124 | else: |
@@ -126,7 +128,7 b' def is_event_loop_running_qt4(app=None):' | |||
|
126 | 128 | def start_event_loop_qt4(app=None): |
|
127 | 129 | """Start the qt4 event loop in a consistent manner.""" |
|
128 | 130 | if app is None: |
|
129 | app = get_app_qt4() | |
|
131 | app = get_app_qt4(['']) | |
|
130 | 132 | if not is_event_loop_running_qt4(app): |
|
131 | 133 | app._in_event_loop = True |
|
132 | 134 | app.exec_() |
General Comments 0
You need to be logged in to leave comments.
Login now