делаю веб-версию, через cgi
ругается что qtimer может быть запущен только в потоке, созданном через Thread
попробовал так:
def __init__(self, parent):
self.parent = parent
t = threading.Thread(target=self.timer)
t.start()
def timer(self):
self.timer = QtCore.QTimer()
QtCore.QObject.connect(self.timer, QtCore.SIGNAL('timeout()'), self.flush)
self.timer.setInterval(200)
self.timer.start()
QObject::startTimer: QTimer can only be used with threads started with QThread, referer: http://pyweb/test/