The PySide.QtCore.QBasicTimer class provides timer events for objects.
This is a fast, lightweight, and low-level class used by Qt internally. We recommend using the higher-level PySide.QtCore.QTimer class rather than this class if you want to use timers in your applications. Note that this timer is a repeating timer that will send subsequent timer events unless the PySide.QtCore.QBasicTimer.stop() function is called.
To use this class, create a PySide.QtCore.QBasicTimer , and call its PySide.QtCore.QBasicTimer.start() function with a timeout interval and with a pointer to a PySide.QtCore.QObject subclass. When the timer times out it will send a timer event to the PySide.QtCore.QObject subclass. The timer can be stopped at any time using PySide.QtCore.QBasicTimer.stop() . PySide.QtCore.QBasicTimer.isActive() returns true for a timer that is running; i.e. it has been started, has not reached the timeout time, and has not been stopped. The timer’s ID can be retrieved using PySide.QtCore.QBasicTimer.timerId() .
The Wiggly example uses PySide.QtCore.QBasicTimer to repaint a widget at regular intervals.
See also
PySide.QtCore.QTimer PySide.QtCore.QTimerEvent QObject.timerEvent() Timers Wiggly Example
Parameters: | QBasicTimer – PySide.QtCore.QBasicTimer |
---|
Contructs a basic timer.
See also
Return type: | PySide.QtCore.bool |
---|
Returns true if the timer is running and has not been stopped; otherwise returns false.
Parameters: |
|
---|
Starts (or restarts) the timer with a msec milliseconds timeout.
The given object will receive timer events.
Stops the timer.
Return type: | PySide.QtCore.int |
---|
Returns the timer’s ID.
See also