fix in-library uses of exec_()

This commit is contained in:
KIU Shueng Chuan 2021-05-14 05:46:57 +08:00
parent 21296cd4f3
commit 0754602c3c
2 changed files with 2 additions and 3 deletions

View File

@ -458,7 +458,7 @@ def startQtEventLoop(name, port, authkey, ppid, debug=False):
global HANDLER
HANDLER = RemoteQtEventHandler(conn, name, ppid, debug=debug)
HANDLER.startEventTimer()
app.exec_()
app.exec() if hasattr(app, 'exec') else app.exec_()
import threading
class FileForwarder(threading.Thread):

View File

@ -99,5 +99,4 @@ if __name__ == '__main__':
b.sigStateChanged.connect(fn)
app.exec_()
app.exec() if hasattr(app, 'exec') else app.exec_()