fix QtScheduler and use it instead of QTimer

This commit is contained in:
Romain Bignon 2010-07-13 23:44:22 +02:00
commit 41317e5029
2 changed files with 25 additions and 18 deletions

View file

@ -18,7 +18,7 @@
from __future__ import with_statement
from PyQt4.QtGui import QWidget, QHBoxLayout, QVBoxLayout, QFrame, QLabel, QImage, QPixmap
from PyQt4.QtCore import SIGNAL, QTimer
from PyQt4.QtCore import SIGNAL
from weboob.capabilities.dating import StatusField
from weboob.tools.application.qt import QtDo
@ -49,17 +49,12 @@ class Account(QFrame):
head.addWidget(self.title)
head.addStretch()
self.body = QLabel()
self.body = QLabel(u'<i>Waiting...</i>')
self.layout().addWidget(headw)
self.layout().addWidget(self.body)
self.timer = QTimer()
self.timer.setSingleShot(False)
self.timer.setInterval(60)
self.connect(self.timer, SIGNAL('timeout()'), self.updateStats)
self.updateStats()
self.weboob.repeat(60, self.updateStats)
def updateStats(self):
self.process = QtDo(self.weboob, self.updateStats_cb)