QTimerEvent 类

QTimerEvent class contains parameters that describe a timer event. 更多...

头: #include <QTimerEvent>
qmake: QT += core
继承: QEvent

公共函数

QTimerEvent (int timerId )
int timerId () const

额外继承成员

详细描述

QTimerEvent class contains parameters that describe a timer event.

计时器事件按定期间隔被发送给已启动一个或多个计时器的对象。每个计时器拥有唯一标识符。启动计时器采用 QObject::startTimer ().

QTimer 类提供使用信号而不是事件的高级编程接口。它还提供单发计时器。

事件处理程序 QObject::timerEvent () 接收计时器事件。

另请参阅 QTimer , QObject::timerEvent (), QObject::startTimer (),和 QObject::killTimer ().

成员函数文档编制

QTimerEvent:: QTimerEvent ( int timerId )

构造计时器事件对象,采用将计时器标识符设为 timerId .

int QTimerEvent:: timerId () const

返回唯一计时器标识符,其是相同标识符作为返回来自 QObject::startTimer ().