def __init__(self, application): self.timer = QtCore.QTimer(application) QtCore.QObject.connect(self.timer, QtCore.SIGNAL('timeout()'), self.refresh) self.timer.setInterval(1000 * 3) self.timer.start() self.counter = 0 self.refresh()
def refreshAfter(i_sec=3): timer = QtCore.QTimer(cmd.Application) QtCore.QObject.connect(timer, QtCore.SIGNAL('timeout()'), refresh) timer.setInterval(1000 * i_sec) timer.setSingleShot(True) timer.start()