このページでは

QTimerEvent Class

QTimerEvent クラスには、タイマーイベントを表すパラメータが含まれています。詳細...

ヘッダー: #include <QTimerEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
継承元: QEvent

パブリック関数

(since 6.8) QTimerEvent(Qt::TimerId timerId)
QTimerEvent(int timerId)
(since 6.8) Qt::TimerId id() const
(since 6.9) bool matches(const QBasicTimer &timer) const
int timerId() const

プロテクトされた関数

QTimerEvent(QTimerEvent &&)
QTimerEvent &operator=(QTimerEvent &&)
QTimerEvent &operator=(const QTimerEvent &other)

詳細な説明

タイマーイベントは、1 つ以上のタイマーを開始したオブジェクトに対して、一定の間隔で送信されます。各タイマーには一意の識別子があります。タイマーは、QObject::startTimer() によって開始されます。

QChronoTimer クラスは、イベントの代わりにシグナルを使用する高レベルのプログラミング インターフェイスを提供します。

イベントハンドラ `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 に設定したタイマーイベントオブジェクトを作成します。

[protected delete] QTimerEvent::QTimerEvent(QTimerEvent &&)

QTimerEvent のインスタンスをmove-constructで生成します。この関数は削除されます。

[since 6.8] Qt::TimerId QTimerEvent::id() const

このイベントに関連付けられたタイマーのQt::TimerId を返します。これは、QObject::startTimer()によって返される識別子をQt::TimerId にキャストしたものと同じです。

この関数は Qt 6.8 で導入されました。

[noexcept, since 6.9] bool QTimerEvent::matches(const QBasicTimer &timer) const

このタイマーイベントとtimer のIDが同じ場合はtrue を返し、そうでない場合はfalse を返します。

この関数は Qt 6.9 で導入されました。

int QTimerEvent::timerId() const

一意のタイマー識別子を返します。これは、QObject::startTimer() から返される識別子と同じものです。

[protected delete] QTimerEvent &QTimerEvent::operator=(QTimerEvent &&)

other をこのQTimerEvent インスタンスに移動・割り当てます。この関数は削除されます。

[noexcept protected default] QTimerEvent &QTimerEvent::operator=(const QTimerEvent &other)

other をこのQTimerEvent インスタンスにコピーして割り当てます。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.