QGraphicsSceneWheelEvent Class
QGraphicsSceneWheelEvent 클래스는 그래픽 뷰 프레임워크에서 휠 이벤트를 제공합니다. 더 보기...
Header: | #include <QGraphicsSceneWheelEvent> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Widgets) target_link_libraries(mytarget PRIVATE Qt6::Widgets) |
qmake: | QT += widgets |
상속합니다: | QGraphicsSceneEvent |
공용 함수
virtual | ~QGraphicsSceneWheelEvent() |
Qt::MouseButtons | buttons() const |
int | delta() const |
(since 6.2) bool | isInverted() const |
Qt::KeyboardModifiers | modifiers() const |
Qt::Orientation | orientation() const |
(since 6.2) Qt::ScrollPhase | phase() const |
(since 6.2) QPoint | pixelDelta() const |
QPointF | pos() const |
QPointF | scenePos() const |
QPoint | screenPos() const |
상세 설명
QWheelEvent에서 수신한 QGraphicsView 은 QGraphicsSceneWheelEvents 로 변환되며, QWheelEvent::globalPos()를 항목, 씬 및 화면 좌표(pos(), scenePos(), screenPos())로 변환합니다.
QGraphicsSceneMouseEvent, QGraphicsSceneContextMenuEvent, QGraphicsSceneHoverEvent, QWheelEvent도 참조하십시오 .
멤버 함수 문서
[virtual noexcept]
QGraphicsSceneWheelEvent::~QGraphicsSceneWheelEvent()
QGraphicsSceneWheelEvent 를 파괴합니다.
Qt::MouseButtons QGraphicsSceneWheelEvent::buttons() const
휠 이벤트가 발생했을 때 눌렀던 마우스 버튼을 반환합니다.
modifiers()도 참조하세요 .
int QGraphicsSceneWheelEvent::delta() const
휠이 회전한 거리를 1/8도 단위로 반환합니다. 양수 값은 휠이 사용자를 향해 앞으로 회전했음을 나타내고 음수 값은 휠이 사용자를 향해 뒤로 회전했음을 나타냅니다.
대부분의 마우스 유형은 15도 단위로 작동하며, 이 경우 델타 값은 120(== 15 * 8)의 배수입니다.
[since 6.2]
bool QGraphicsSceneWheelEvent::isInverted() const
이벤트와 함께 전달된 델타 값이 반전되었는지 여부를 반환합니다.
이 함수는 Qt 6.2에 도입되었습니다.
Qt::KeyboardModifiers QGraphicsSceneWheelEvent::modifiers() const
휠 이벤트가 발생했을 때 활성화된 키보드 수정자를 반환합니다.
buttons()도 참조하세요 .
Qt::Orientation QGraphicsSceneWheelEvent::orientation() const
휠 방향을 반환합니다.
[since 6.2]
Qt::ScrollPhase QGraphicsSceneWheelEvent::phase() const
이 휠 이벤트의 스크롤 단계를 반환합니다.
이 함수는 Qt 6.2에 도입되었습니다.
QWheelEvent::phase 를참조하십시오 .
[since 6.2]
QPoint QGraphicsSceneWheelEvent::pixelDelta() const
화면의 스크롤 거리를 픽셀 단위로 반환합니다. 이 값은 macOS와 같이 고해상도 픽셀 기반 델타 값을 지원하는 플랫폼에서 제공됩니다. 이 값은 화면에서 콘텐츠를 스크롤할 때 직접 사용해야 합니다.
이 기능은 Qt 6.2에 도입되었습니다.
QWheelEvent::pixelDelta 를참조하세요 .
QPointF QGraphicsSceneWheelEvent::pos() const
휠 이벤트가 발생했을 때 커서의 위치를 항목 좌표로 반환합니다.
scenePos() 및 screenPos()도 참조하세요 .
QPointF QGraphicsSceneWheelEvent::scenePos() const
휠 이벤트가 발생했을 때 커서의 위치를 씬 좌표로 반환합니다.
QPoint QGraphicsSceneWheelEvent::screenPos() const
휠 이벤트가 발생했을 때 커서의 위치를 화면 좌표로 반환합니다.
© 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.