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 |
프로퍼티 문서
exclusivePointGrabber : QObject*
이 속성은 향후 업데이트를 받을 개체를 보유합니다.
독점 그래버는 향후 모든 업데이트 이벤트와 이 이벤트와 동일한 포인트를 포함하는 릴리스 이벤트를 수신하도록 선택한 개체입니다.
독점 포인트 그래버 속성을 설정하면 다음과 같이 편리하게 사용할 수 있습니다:
setExclusiveGrabber(points().first(), exclusiveGrabber);
함수에 액세스합니다:
QObject * | exclusivePointGrabber() const |
void | setExclusivePointGrabber(QObject *exclusiveGrabber) |
멤버 함수 문서
Qt::MouseButton QSinglePointEvent::button() const
이벤트를 발생시킨 버튼을 반환합니다.
반환되는 값은 마우스 이동 이벤트의 경우 항상 Qt::NoButton 이며, TabletMove, TabletEnterProximity, TabletLeaveProximity 이벤트도 반환됩니다.
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 를참조하세요 .
© 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.