6.0.0-rc4Source

QTimerEvent Class

The QTimerEvent class contains parameters that describe a timer event. More…

Header#include <QTimerEvent>
CMaketarget_link_libraries(app PRIVATE Nt::Core)
ModuleNt Core C++ Classes
InheritsQEvent

List of all members, including inherited members

Public Functions

QTimerEvent(int timerId)
~QTimerEvent()
inttimerId() const
Qt::TimerIdid() const
boolmatches(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

[explicit] QTimerEvent::QTimerEvent(int timerId)

Constructs a timer event for the timer with the identifier timerId.

[override] QTimerEvent::~QTimerEvent()

Destroys the timer event.

[override] 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().