QScrollEvent Class
QScrollEvent 클래스는 스크롤이 발생할 때 전송됩니다. 더 보기...
| 헤더: | #include <QScrollEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| 상속: | QEvent |
- 상속된 멤버를 포함한 모든 멤버 목록
- QScrollEvent는 이벤트 클래스의 일부입니다.
공개 유형
| enum | ScrollState { ScrollStarted, ScrollUpdated, ScrollFinished } |
공개 함수
| QScrollEvent(const QPointF &contentPos, const QPointF &overshootDistance, QScrollEvent::ScrollState scrollState) | |
| QPointF | contentPos() const |
| QPointF | overshootDistance() const |
| QScrollEvent::ScrollState | scrollState() const |
보호된 함수
| QScrollEvent(QScrollEvent &&) | |
| QScrollEvent & | operator=(QScrollEvent &&) |
| QScrollEvent & | operator=(const QScrollEvent &other) |
상세 설명
스크롤 이벤트는 수신자가 스크롤되어야 함을 나타내기 위해 전송됩니다. 일반적으로 수신자는 QWidget 이나 QGraphicsObject 과 같은 시각적 요소여야 합니다.
두 개의 소스에서 상충되는 QScrollEvent가 전송되지 않도록 주의해야 합니다. 다만 QScroller::scrollTo 를 사용하는 것은 안전합니다.
QScrollPrepareEvent 및 QScroller도 참조하십시오 .
멤버 유형 문서
enum QScrollEvent::ScrollState
이 열거형은 스크롤 이벤트가 가질 수 있는 상태를 설명합니다.
| 상수 | 값 | 설명 |
|---|---|---|
QScrollEvent::ScrollStarted | 0 | 스크롤 활동의 첫 번째 스크롤 이벤트에 대해 설정됩니다. |
QScrollEvent::ScrollUpdated | 1 | 스크롤 활동의 첫 번째 및 마지막 스크롤 이벤트를 제외한 모든 스크롤 이벤트에 설정됩니다. |
QScrollEvent::ScrollFinished | 2 | 스크롤 활동의 마지막 스크롤 이벤트에 대해 설정됩니다. |
QScrollEvent::scrollState()도 참조하십시오 .
멤버 함수 설명서
QScrollEvent::QScrollEvent(const QPointF &contentPos, const QPointF &overshootDistance, QScrollEvent::ScrollState scrollState)
새로운 QScrollEvent를 생성합니다. contentPos 는 새로운 콘텐츠 위치, overshootDistance 는 새로운 오버슈트 거리이며, scrollState 는 이 스크롤 이벤트가 첫 번째, 마지막 또는 그 사이의 이벤트인지 여부를 나타냅니다.
[protected delete] QScrollEvent::QScrollEvent(QScrollEvent &&)
QScrollEvent 의 인스턴스를 move-construct로 생성합니다. 이 함수는 삭제되었습니다.
QPointF QScrollEvent::contentPos() const
새로운 스크롤 위치를 반환합니다.
QPointF QScrollEvent::overshootDistance() const
새로운 오버슈트 거리를 반환합니다. ‘오버슈트’라는 용어에 대한 설명은 QScroller 를 참조하십시오.
QScroller도 참조하십시오 .
QScrollEvent::ScrollState QScrollEvent::scrollState() const
현재 스크롤 상태를 ScrollStateFlag 값의 조합으로 반환합니다. 이 스크롤 이벤트가 스크롤 활동에서 첫 번째(또는 마지막) 이벤트인 경우, ‘ ScrollStarted ’(또는 ‘ ScrollFinished ’)가 설정됩니다. 활동이 단일 ` QScrollEvent`로 구성되어 있는 경우, 두 값이 동시에 설정될 수 있다는 점에 유의하십시오. 그 사이에 발생하는 다른 모든 스크롤 이벤트의 상태는 ` ScrollUpdated`로 설정됩니다.
예를 들어, 위젯은 스크롤이 시작되거나 중지될 때 선택 상태를 초기화할 수 있습니다.
[protected delete] QScrollEvent &QScrollEvent::operator=(QScrollEvent &&)
other 를 이 QScrollEvent 인스턴스에 이동 할당합니다. 이 함수는 삭제됩니다.
[noexcept protected default] QScrollEvent &QScrollEvent::operator=(const QScrollEvent &other)
other 를 이 QScrollEvent 인스턴스에 복사-할당합니다.
© 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.