이 페이지에서

QSwipeGesture Class

QSwipeGesture 클래스는 사용자가 수행하는 스와이프 제스처를 설명합니다. 더 보기...

헤더: #include <QSwipeGesture>
CMake: find_package(Qt6 REQUIRED COMPONENTS Widgets)
target_link_libraries(mytarget PRIVATE Qt6::Widgets)
qmake: QT += widgets
상속: QGesture

공개 유형

enum SwipeDirection { NoDirection, Left, Right, Up, Down }

속성

공개 함수

virtual ~QSwipeGesture()
QSwipeGesture::SwipeDirection horizontalDirection() const
void setSwipeAngle(qreal value)
qreal swipeAngle() const
QSwipeGesture::SwipeDirection verticalDirection() const

상세 설명

스와이프 제스처 시연

Qt Widgets에서의 제스처 처리 개요 및 애플리케이션에서 제스처를 사용하는 방법에 대한 정보는 ‘위젯 및 그래픽 뷰의 제스처’ 문서를 참조하십시오.

QPanGesture 및 QPinchGesture도 참조하십시오 .

멤버 유형 문서

enum QSwipeGesture::SwipeDirection

이 열거형은 제스처가 수평축과 수직축을 따라 이동할 수 있는 방향을 나타냅니다.

상수값설명
QSwipeGesture::NoDirection0제스처에 특정 축과 관련된 움직임이 없었습니다.
QSwipeGesture::Left1제스처에 수평 방향의 왼쪽으로의 움직임이 포함되었습니다.
QSwipeGesture::Right2이 제스처에는 오른쪽으로의 수평 움직임이 포함되었습니다.
QSwipeGesture::Up3이 제스처에는 위쪽을 향한 수직 움직임이 포함되었습니다.
QSwipeGesture::Down4이 제스처에는 아래쪽을 향한 수직 움직임이 포함되었습니다.

속성 문서

[read-only] horizontalDirection : SwipeDirection

이 속성은 제스처의 수평 방향을 나타냅니다.

제스처에 수평 성분이 있는 경우, 수평 방향은 Left 또는 Right이며, 그렇지 않은 경우 NoDirection 입니다.

액세스 함수:

QSwipeGesture::SwipeDirection horizontalDirection() const

verticalDirection 및 swipeAngle도 참조하십시오 .

swipeAngle : qreal

이 속성은 제스처와 관련된 움직임의 각도를 저장합니다.

제스처에 수평 또는 수직 성분이 있는 경우, 스와이프 각도는 표준 위젯 좌표계를 사용하여 정의된 x축과 운동 방향 사이의 각도를 나타냅니다.

액세스 함수:

qreal swipeAngle() const
void setSwipeAngle(qreal value)

horizontalDirection 및 verticalDirection도 참조하십시오 .

[read-only] verticalDirection : SwipeDirection

이 속성은 제스처의 수직 방향을 나타냅니다.

제스처에 수직 성분이 있는 경우, 수직 방향은 ‘Up’ 또는 ‘Down’이며, 그렇지 않은 경우 ‘ NoDirection ’입니다.

액세스 함수:

QSwipeGesture::SwipeDirection verticalDirection() const

horizontalDirection 및 swipeAngle도 참조하십시오 .

멤버 함수 설명서

[virtual noexcept] QSwipeGesture::~QSwipeGesture()

소멸자.

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