Skip to content

Commit 88b64c7

Browse files
authored
Merge pull request #63 from gaowen9304/master
Use a custom QApplication intstance if one existed when running the event loop.
2 parents 0fb247e + 52d8a0c commit 88b64c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qasync/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ def wrapper(*args, **kwargs):
796796

797797
class QEventLoopPolicyMixin:
798798
def new_event_loop(self):
799-
return QEventLoop(QApplication(sys.argv))
799+
return QEventLoop(QApplication.instance() or QApplication(sys.argv))
800800

801801

802802
class DefaultQEventLoopPolicy(

0 commit comments

Comments
 (0)