QSinglePointEvent Class
마우스 이벤트와 같이 단일 점을 포함하는 포인터 이벤트의 기본 클래스입니다. 더 보기...
| 헤더: | #include <QSinglePointEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| 다음부터: | Qt 6.0 |
| 상속받음: | QPointerEvent |
| 상속 대상: | QEnterEvent, QHoverEvent, QMouseEvent, QNativeGestureEvent, QTabletEvent 및 QWheelEvent |
속성
- exclusivePointGrabber : QObject*
공개 함수
| Qt::MouseButton | button() const |
| Qt::MouseButtons | buttons() const |
| QObject * | exclusivePointGrabber() const |
| QPointF | globalPosition() const |
| QPointF | position() const |
| QPointF | scenePosition() const |
| void | setExclusivePointGrabber(QObject *exclusiveGrabber) |
재구현된 공용 함수
| virtual bool | isBeginEvent() const override |
| virtual bool | isEndEvent() const override |
| virtual bool | isUpdateEvent() const override |
보호된 함수
| QSinglePointEvent(QSinglePointEvent &&) | |
| QSinglePointEvent & | operator=(QSinglePointEvent &&) |
| QSinglePointEvent & | operator=(const QSinglePointEvent &other) |
속성 설명
exclusivePointGrabber : QObject*
이 속성은 향후 업데이트를 수신할 객체를 보관합니다.
독점 그라버는 향후 모든 업데이트 이벤트와, 이 이벤트가 전달하는 것과 동일한 좌표를 포함하는 릴리스 이벤트를 수신하도록 선택된 객체입니다.
exclusivePointGrabber 속성을 설정하는 것은 다음과 동등한 편리한 방법입니다:
setExclusiveGrabber(points().first(), exclusiveGrabber);함수 액세스:
| QObject * | exclusivePointGrabber() const |
| void | setExclusivePointGrabber(QObject *exclusiveGrabber) |
멤버 함수 문서
[protected delete] QSinglePointEvent::QSinglePointEvent(QSinglePointEvent &&)
QSinglePointEvent 의 인스턴스를 move-construct로 생성합니다. 이 함수는 삭제되었습니다.
Qt::MouseButton QSinglePointEvent::button() const
이벤트를 발생시킨 버튼을 반환합니다.
마우스 이동 이벤트는 물론, TabletMove, TabletEnterProximity, TabletLeaveProximity 이벤트의 경우 반환 값은 항상 Qt::NoButton 입니다.
buttons()도 참조하십시오 .
Qt::MouseButtons QSinglePointEvent::buttons() const
이벤트가 발생했을 당시의 버튼 상태를 반환합니다.
버튼 상태는 OR 연산자를 사용하여 Qt::LeftButton, Qt::RightButton, Qt::MiddleButton 를 조합한 것입니다.
마우스 이동 또는 TabletMove 이벤트의 경우, 이는 눌려 있는 모든 버튼을 의미합니다.
마우스 누름, 더블 클릭 또는 TabletPress 이벤트의 경우, 이벤트를 유발한 버튼이 포함됩니다.
마우스 릴리스 또는 TabletRelease 이벤트의 경우, 이벤트를 유발한 버튼은 제외됩니다.
button()도 참조하십시오 .
QPointF QSinglePointEvent::globalPosition() const
이 이벤트에서 해당 점의 화면 또는 가상 데스크톱 상의 위치를 반환합니다.
참고: 마우스 포인터의 전역위치는 이벤트 발생 시점에 기록됩니다. 이는 X11과 같은 비동기식 창 시스템에서 중요한 사항입니다. 마우스 이벤트에 반응하여 위젯을 이동시킬 때마다, globalPosition()이 반환하는 값은 QCursor::pos()이 반환하는 현재 커서 위치와 크게 다를 수 있습니다.
position()도 참조하십시오 .
[override virtual] bool QSinglePointEvent::isBeginEvent() const
이 이벤트가 ‘ button ’ 키가 눌린 것을 나타내는 경우 ` true `를 반환합니다.
[override virtual] bool QSinglePointEvent::isEndEvent() const
이 이벤트가 해제되는 ` button `을 나타내는 경우 ` true `을 반환합니다.
[override virtual] bool QSinglePointEvent::isUpdateEvent() const
이 이벤트에 ` button state`의 변경 사항이 포함되어 있지 않은 경우 ` true `을 반환합니다.
QPointF QSinglePointEvent::position() const
이 이벤트에서 해당 지점의 위치를, 이벤트를 수신한 위젯이나 항목을 기준으로 하여 반환합니다.
마우스 이벤트에 반응하여 위젯의 위치를 이동시키려면 대신 ` globalPosition()`를 사용하십시오.
globalPosition()도 참조하십시오 .
QPointF QSinglePointEvent::scenePosition() const
이 이벤트에서 해당 지점의 위치를 창이나 씬을 기준으로 상대적인 위치로 반환합니다.
QEventPoint::scenePosition도 참조하십시오 .
[protected delete] QSinglePointEvent &QSinglePointEvent::operator=(QSinglePointEvent &&)
other 를 이 QSinglePointEvent 인스턴스에 할당합니다. 이 함수는 삭제됩니다.
[noexcept protected default] QSinglePointEvent &QSinglePointEvent::operator=(const QSinglePointEvent &other)
other 를 이 QSinglePointEvent 인스턴스에 복사-할당합니다.
© 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.