def enable_asyncore_loop(self):
"""Hooks our asyncore loop into Qt's event queue."""
def beat():
asyncore.loop(count=1, timeout=0)
# Yep, this isn't especially real-time IO, but it's fine for what we do.
timer = QTimer()
timer.timeout.connect(beat)
timer.setSingleShot(False)
timer.setInterval(15)
timer.start()
self._timer = timer
评论列表
文章目录