def setup_save_timer(self, interval=500): """ Initialise the autosave timer. :param interval: autosave interval in milliseconds :type interval: int """ self.autosave_timer = QtCore.QTimer() self.autosave_timer.setSingleShot(True) self.autosave_timer.setInterval(interval)
def start_timer(self): """ Starts timer for self.check_update_globals """ self.timer = QtCore.QTimer() self.timer.setInterval(100) self.timer.timeout.connect(self.check_update_globals) self.timer.start()
def pythonKnobEdit(): if nuke.thisKnob().name() == 'showPanel': # TODO: is there a 'knob added' knobchanged? node = nuke.thisNode() global timer timer = QtCore.QTimer() timer.setSingleShot(True) timer.setInterval(10) timer.timeout.connect(partial(addTextKnobs, node)) timer.start()
def __init__(self): super(Terminal, self).__init__() self.setReadOnly(True) self.setObjectName('Terminal') self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint) self.queue = Queue() self.timer = QtCore.QTimer() self.timer.timeout.connect(self.check_queue) self.timer.setInterval(10) self.timer.start() self.interval = time.time()