이 페이지에서

PointerDevice QML Type

QPointingDevice 의 QML 대응 요소. 더 보기...

Import Statement: import QtQuick
In C++: QPointingDevice

속성

신호

  • grabChanged(QtObject grabber, enumeration transition, PointerEvent event, eventPoint point)

상세 설명

PointerDevice는 QPointingDevice 클래스의 QML 이름입니다. 이 클래스는 QPointingDevice 와 동일한 속성과 열거형을 가지고 있습니다.

속성 설명

buttonCount : int [read-only]

이 속성은 감지할 수 있는 기기 내 버튼의 최대 개수를 나타냅니다.

deviceType : enumeration

이 속성은 ‘ PointerEvent ’을 생성한 장치의 유형을 나타냅니다.

유효한 값은 다음과 같습니다:

상수설명
PointerDevice.Unknown장치를 식별할 수 없습니다.
PointerDevice.Mouse마우스.
PointerDevice.TouchScreen터치스크린.
PointerDevice.TouchPad터치패드 또는 트랙패드.
PointerDevice.Stylus그래픽 태블릿의 스타일러스.
PointerDevice.Airbrush그래픽 태블릿의 에어브러시.
PointerDevice.Puck그래픽 태블릿에 있는 십자선이 있는 디지타이저.

QInputDevice::DeviceType 및 PointerDeviceHandler::acceptedDevices도 참조하십시오 .

maximumPoints : int [read-only]

이 속성은 감지할 수 있는 최대 동시 터치 포인트(손가락) 수를 나타냅니다.

pointerType : enumeration [read-only]

이 속성은 PointerDevice 와 상호작용하는 대상이 무엇인지 나타냅니다.

이 속성과 ` deviceType` 사이에는 일부 중복이 있습니다. 예를 들어, 터치스크린을 사용하는 경우 ` deviceType `는 ` TouchScreen `이고, ` pointerType `는 ` Finger`입니다. 하지만 그래픽 태블릿에서는 스타일러스의 양쪽 끝을 모두 사용할 수 있는 경우가 많으며, 프로그램은 이를 구분해야 합니다. ` PointerDeviceHandler::acceptedDevices `와 ` PointerDeviceHandler::acceptedPointerTypes `를 조합하여 특정 핸들러가 반응해야 할 이벤트의 하위 집합을 필터링할 수 있습니다.

유효한 값은 다음과 같습니다:

상수설명
PointerDevice.Unknown장치를 식별할 수 없습니다.
PointerDevice.Generic마우스 또는 마우스를 에뮬레이트하는 장치입니다.
PointerDevice.Finger터치스크린 위의 손가락.
PointerDevice.Pen그래픽 태블릿의 스타일러스.
PointerDevice.Eraser그래픽 태블릿의 지우개.
PointerDevice.Cursor그래픽 태블릿의 십자선이 있는 디지타이저.

QPointingDevice::PointerType 및 PointerDeviceHandler::acceptedPointerTypes도 참조하십시오 .

uniqueId : pointingDeviceUniqueId [read-only]

이 속성은 가능한 경우 장치에 대한 고유 ID를 제공할 수 있습니다. 예를 들어, 그래픽 태블릿 스타일러스 장치에는 고유한 일련번호가 있을 수 있습니다.

eventPoint 및 QEventPoint::uniqueId()도 참조하십시오 .

Signal 문서

grabChanged(QtObject grabber, enumeration transition, PointerEvent event, eventPoint point)

이 신호는 grabber 객체가 event 를 전달하는 동안 point 에 대한 배타적 또는 수동적 그랩을 획득하거나 상실할 때 발생합니다. transition 는 grabber 객체( Item 이거나 Input Handler일 수 있음)의 관점에서 어떤 일이 발생했는지를 알려줍니다.

transition 의 유효한 값은 다음과 같습니다:

상수설명
PointerDevice.GrabExclusivegrabber 가 point 처리에 대한 주된 책임을 맡았습니다.
PointerDevice.UngrabExclusivegrabber 가 이전의 배타적 확보를 포기했습니다.
PointerDevice.CancelGrabExclusivegrabber 의 배타적 그랩이 인수되거나 취소되었습니다.
PointerDevice.GrabPassivegrabber 는 point 를 감시하기 위해 수동 그랩을 획득했습니다.
PointerDevice.UngrabPassivegrabber 가 이전의 수동 그랩을 포기했습니다.
PointerDevice.CancelGrabPassive이전 수동 그랩이 비정상적으로 종료되었습니다.

참고: 한 객체에서 다른 객체로그랩이 전환되면 , 한 객체가 그랩을 잃었다는 것과 다른 그랩퍼가 존재한다는 것을 알리기 위해 두 개의 신호가 발생합니다. 그 외의 경우, 그랩 상태가 아닌 상태로 전환되거나 그 상태로 돌아갈 때는 하나의 신호만 발생합니다.

참고: 해당 핸들러는 onGrabChanged 입니다.

QPointerEvent::setExclusiveGrabber(), QPointerEvent::addPassiveGrabber(), QPointerEvent::removePassiveGrabber(), PointerHandler::grabChanged()도 참조하십시오 .

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