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 } |
プロパティ
- horizontalDirection : SwipeDirection
- swipeAngle : qreal
- verticalDirection : SwipeDirection
公開関数
| virtual | ~QSwipeGesture() |
| QSwipeGesture::SwipeDirection | horizontalDirection() const |
| void | setSwipeAngle(qreal value) |
| qreal | swipeAngle() const |
| QSwipeGesture::SwipeDirection | verticalDirection() const |
詳細な説明

Qt におけるジェスチャ処理の概要およびアプリケーションでのジェスチャの使用方法については、「Qt Widgets およびグラフィックスビューにおけるジェスチャ」ドキュメントを参照してください。
「 QPanGesture 」および「QPinchGesture 」も参照してください 。
メンバ型のドキュメント
enum QSwipeGesture::SwipeDirection
この列挙型は、ジェスチャーの水平軸および垂直軸に沿った動きの可能な方向を表します。
| 定数 | 値 | 説明 |
|---|---|---|
QSwipeGesture::NoDirection | 0 | そのジェスチャーには、特定の軸に沿った動きが関連付けられていませんでした。 |
QSwipeGesture::Left | 1 | ジェスチャーには、左方向への水平移動が含まれていました。 |
QSwipeGesture::Right | 2 | そのジェスチャーには、右方向への水平移動が含まれていました。 |
QSwipeGesture::Up | 3 | そのジェスチャーには、上方向への垂直な動きが含まれていました。 |
QSwipeGesture::Down | 4 | そのジェスチャーには、下方向への垂直運動が含まれていました。 |
プロパティのドキュメント
[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 」も参照してください 。
© 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.