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 におけるジェスチャ処理の概要と、アプリケーションでジェスチャを使用するための情報については、 「ウィジェットとグラフィックスビューにおけるジェスチャ」を参照してください。

QPanGesture およびQPinchGestureも参照してください

メンバ型 ドキュメント

enum QSwipeGesture::SwipeDirection

この列挙型は、水平軸と垂直軸に沿ったジェスチャの動きの可能な方向を記述します。

定数説明
QSwipeGesture::NoDirection0ジェスチャは、特定の軸でそれに関連付けられたモーションを持っていませんでした。
QSwipeGesture::Left1ジェスチャには、左への水平方向の動きが含まれていました。
QSwipeGesture::Right2ジェスチャには、右への水平方向の動きが含まれていました。
QSwipeGesture::Up3ジェスチャには、上向きの垂直方向のモーションが含まれていました。
QSwipeGesture::Down4ジェスチャは、下向きの垂直方向の動きを含んでいた。

プロパティのドキュメント

[read-only] horizontalDirection : const SwipeDirection

このプロパティは、ジェスチャの水平方向を保持します。

NoDirectionジェスチャに水平方向のコンポーネントがある場合、水平方向は Left または Right になります。

アクセス関数:

QSwipeGesture::SwipeDirection horizontalDirection() const

verticalDirection およびswipeAngleも参照してください

swipeAngle : qreal

このプロパティは、ジェスチャに関連付けられた動きの角度を保持します。

ジェスチャが水平または垂直コンポーネントを持つ場合、スワイプ角度は、標準のウィジェット座標系を使用して定義されるように、動きの方向とx軸の間の角度を記述します。

関数にアクセスします:

qreal swipeAngle() const
void setSwipeAngle(qreal value)

horizontalDirection およびverticalDirectionも参照してください

[read-only] verticalDirection : const SwipeDirection

このプロパティは、ジェスチャの垂直方向を保持します。

ジェスチャに垂直方向のコンポーネントがある場合、垂直方向は Up または Down です。そうでない場合は、NoDirection です。

アクセス関数:

QSwipeGesture::SwipeDirection verticalDirection() const

horizontalDirection およびswipeAngleも参照してください

メンバ関数ドキュメント

[virtual noexcept] QSwipeGesture::~QSwipeGesture()

破壊者。

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