##// END OF EJS Templates
Add debug statements to observe loop
Emilio Graff -
Show More
@@ -20,6 +20,9 b' def _reclaim_excepthook():'
20 sys.excepthook = shell.excepthook
20 sys.excepthook = shell.excepthook
21
21
22
22
23 announced = 0
24
25
23 def inputhook(context):
26 def inputhook(context):
24 global _appref
27 global _appref
25 app = QtCore.QCoreApplication.instance()
28 app = QtCore.QCoreApplication.instance()
@@ -57,6 +60,15 b' def inputhook(context):'
57
60
58 event_loop = QtCore.QEventLoop(app)
61 event_loop = QtCore.QEventLoop(app)
59
62
63 global announced
64 if announced == 0:
65 print(f"`inputhook` running Qt {QtCore.qVersion()} event loop.")
66 announced += 1
67 elif announced == 10:
68 announced = 0
69 else:
70 announced += 1
71
60 if sys.platform == 'win32':
72 if sys.platform == 'win32':
61 # The QSocketNotifier method doesn't appear to work on Windows.
73 # The QSocketNotifier method doesn't appear to work on Windows.
62 # Use polling instead.
74 # Use polling instead.
General Comments 0
You need to be logged in to leave comments. Login now