QPointerEvent Class

ポインタ・イベントの基本クラス。詳細...

ヘッダ #include <QPointerEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
以来:Qt 6.0
を継承する: QInputEvent
継承元

QSinglePointEvent そしてQTouchEvent

パブリック関数

bool addPassiveGrabber(const QEventPoint &point, QObject *grabber)
bool allPointsAccepted() const
bool allPointsGrabbed() const
void clearPassiveGrabbers(const QEventPoint &point)
QObject *exclusiveGrabber(const QEventPoint &point) const
QList<QPointer<QObject>> passiveGrabbers(const QEventPoint &point) const
QEventPoint &point(qsizetype i)
QEventPoint *pointById(int id)
qsizetype pointCount() const
QPointingDevice::PointerType pointerType() const
const QPointingDevice *pointingDevice() const
const QList<QEventPoint> &points() const
bool removePassiveGrabber(const QEventPoint &point, QObject *grabber)
void setExclusiveGrabber(const QEventPoint &point, QObject *exclusiveGrabber)

再実装パブリック関数

virtual void setAccepted(bool accepted) override

詳細説明

メンバー関数ドキュメント

bool QPointerEvent::addPassiveGrabber(const QEventPoint &point, QObject *grabber)

指定されたgrabber が、今後配信されるすべての更新イベントと、指定されたpoint を含むリリースイベントを受信することを、これらのイベントが他のどこで配信されるかに関係なく、配信ロジックに通知します。

これはQt Quick 入力ハンドラによってのみ使用されます。

grabber がすでに追加されている場合はfalse を、そうでない場合はtrue を返します。

bool QPointerEvent::allPointsAccepted() const

points() 内のすべての点について、isPointAccepted() がtrue であればtrue を返し、そうでなければfalse を返す。

bool QPointerEvent::allPointsGrabbed() const

points() のすべての点が、exclusiveGrabber() または 1 つ以上のpassiveGrabbers() を持つ場合、true を返す。

void QPointerEvent::clearPassiveGrabbers(const QEventPoint &point)

与えられたpoint から全てのパッシブグラバーを削除する。

これはQt Quick 入力ハンドラでのみ使用されます。

QPointerEvent::addPassiveGrabber()も参照してください

QObject *QPointerEvent::exclusiveGrabber(const QEventPoint &point) const

将来のすべての更新イベントと、与えられたpoint を含むリリースイベントを受け取るように設定されたオブジェクトを返します。

現時点では、主にQt Quick で使用するためのものです。

setExclusiveGrabber()も参照してください

QList<QPointer<QObject>> QPointerEvent::passiveGrabbers(const QEventPoint &point) const

指定されたpoint を含む、今後のすべての更新イベントとリリースイベントの受信を要求されたオブジェクトのリストを返します。

これはQt Quick 入力ハンドラによってのみ使用されます。

QPointerEvent::addPassiveGrabber()も参照してください

QEventPoint &QPointerEvent::point(qsizetype i)

インデックスi にある点のリファレンスQEventPoint を返す。

QEventPoint *QPointerEvent::pointById(int id)

id が与えられたid と一致する点、またはそのような点が見つからない場合はnullptr を返します。

qsizetype QPointerEvent::pointCount() const

このポインターイベントのポイント数を返します。

QPointingDevice::PointerType QPointerEvent::pointerType() const

イベントを発生させたポイントのタイプを返します。

const QPointingDevice *QPointerEvent::pointingDevice() const

このイベントの発生元デバイスを返します。

これはQInputEvent::device() と同じですが、便宜上型キャストされています。

const QList<QEventPoint> &QPointerEvent::points() const

このポインターイベントのポイントのリストを返す。

bool QPointerEvent::removePassiveGrabber(const QEventPoint &point, QObject *grabber)

パッシブgrabber が以前に追加されていた場合、与えられたpoint から削除する。パッシブグラバーであった場合はtrue を返し、そうでない場合はfalse を返します。

Qt Quick 入力ハンドラでのみ使用可能です。

QPointerEvent::addPassiveGrabber()も参照してください

[override virtual] void QPointerEvent::setAccepted(bool accepted)

void QPointerEvent::setExclusiveGrabber(const QEventPoint &point, QObject *exclusiveGrabber)

指定されたexclusiveGrabber が今後のすべてのアップデートイベントと指定されたpoint を含むリリースイベントを受信すること、および他のアイテムへの配信はスキップできることを配信ロジックに通知します。

現時点では主にQt Quick

exclusiveGrabber()も参照してください

© 2025 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.