QPointerEvent Class

포인터 이벤트를 위한 베이스 클래스입니다. 더 보기...

Header: #include <QPointerEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
이후: Qt 6.0
상속합니다: QInputEvent
상속 대상:

QSinglePointEventQTouchEvent

공용 함수

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() 또는 하나 이상의 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)

이전에 추가된 경우 지정된 point 에서 grabber 패시브를 제거합니다. 이전에 패시브 그래버였던 경우 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.