QTimerEvent Class
The QTimerEvent class contains parameters that describe a timer event. More…
| Header | #include <QTimerEvent> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
| Inherits | QEvent |
List of all members, including inherited members
Public Functions
| QTimerEvent(int timerId) | |
| ~QTimerEvent() | |
| int | timerId() const |
| Qt::TimerId | id() const |
| bool | matches(const QBasicTimer &timer) const |
Reimplemented Public Functions
| QTimerEvent * | clone() const |
Detailed Description
A timer event of type QEvent::Timer is sent to a QObject when one of its timers, started with QObject::startTimer(), fires. Handle it by reimplementing QObject::timerEvent().
See also QObject::timerEvent(), QObject::startTimer() and QEvent.
Differences from Qt
None beyond QEvent: the event has no TimerType.
Member Function Documentation
QTimerEvent::QTimerEvent(int timerId)
Constructs a timer event for the timer with the identifier timerId.
QTimerEvent::~QTimerEvent()
Destroys the timer event.
QTimerEvent * QTimerEvent::clone() const
Reimplements QEvent::clone().
Qt::TimerId QTimerEvent::id() const
Returns the identifier of the timer that fired as a Qt::TimerId.
This function was introduced in 6.8.
See also timerId() and matches().
bool QTimerEvent::matches(const QBasicTimer &timer) const
Returns true if this event comes from timer; otherwise returns false.
This function was introduced in 6.9.
int QTimerEvent::timerId() const
Returns the identifier of the timer that fired, as returned by QObject::startTimer().