QTimerEvent 类包含计时器事件的描述参数。 更多...
| 头: |
#include <QTimerEvent>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
|
| qmake: |
QT += core
|
| 继承: | QEvent |
(从 6.8 起)
|
QTimerEvent (Qt::TimerId timerId ) |
| QTimerEvent (int timerId ) | |
(从 6.8 起)
Qt::TimerId
|
id () const |
| int | timerId () const |
计时器事件按定期间隔被发送给已启动一个或多个计时器的对象。每个计时器拥有唯一标识符。启动计时器采用 QObject::startTimer ().
The QChronoTimer class provides a high-level programming interface that uses signals instead of events.
事件处理程序 QObject::timerEvent () 接收计时器事件。
另请参阅 QChronoTimer , QObject::timerEvent (), QObject::startTimer (),和 QObject::killTimer ().
[explicit, since 6.8]
QTimerEvent::
QTimerEvent
(
Qt::TimerId
timerId
)
构造计时器事件对象,采用将计时器标识符设为 timerId .
该函数在 Qt 6.8 引入。
[explicit]
QTimerEvent::
QTimerEvent
(
int
timerId
)
构造计时器事件对象,采用将计时器标识符设为 timerId .
[since 6.8]
Qt::TimerId
QTimerEvent::
id
() const
返回 Qt::TimerId of the timer associated with this event, which is the same identifier returned by QObject::startTimer () cast to Qt::TimerId .
该函数在 Qt 6.8 引入。
返回唯一计时器标识符,其是相同标识符作为返回来自 QObject::startTimer ().