このページでは

TouchSelectionMenuRequest QML Type

タッチ選択メニューを表示するリクエスト。もっと見る

Import Statement: import QtWebEngine
Since: QtWebEngine 6.3

列挙

プロパティ

詳細説明

TouchSelectionMenuRequest は、WebEngineView::touchSelectionMenuRequest シグナルの引数として渡されます。リクエストのコンテキストに関する詳細情報を提供します。selectionBounds プロパティは、リクエストの発信元を示します。

リクエストのaccepted プロパティは、リクエストをユーザーコードで処理するか、デフォルトのタッチ選 択メニューを表示するかを示します。

以下のコードでは、カスタム・メニューを使用してリクエストを処理しています:

WebEngineView {
    id: view
    // ...
    onTouchSelectionMenuRequested: function(request) {
        request.accepted = true;
        myMenu.x = request.selectionBounds.x;
        myMenu.y = request.selectionBounds.y;
        myMenu.trigger.connect(view.triggerWebAction);
        myMenu.popup();
    }
    // ...
}

列挙ドキュメント

[since QtWebEngine 6.3] TouchSelectionCommandFlags

注意: デフォルトのタッチ選択メニューでは、コンテキストメニューの表示は常に別のアクションとして利用可能です。

定数説明
TouchSelectionMenuRequest.Cut切り取りが可能です。
TouchSelectionMenuRequest.Copyコピー
TouchSelectionMenuRequest.Paste貼り付けが可能です。

このドキュメントは QtWebEngine 6.3 で導入されました。

プロパティの説明

accepted : bool

タッチ選択メニュー要求がシグナルハンドラによって処理されたかどうかを示す。

WebEngineView::touchSelectionMenuRequested のシグナルハンドラが実行された後、このプロパティがfalse である場合、デフォルトのタッチ選択メニューが表示される。これを防ぐには、request.acceptedtrue に設定する。

デフォルトはfalse です。

注意: タッチ選択メニューのデフォルトの内容は、リクエストが実際に 生成された Web 要素によって異なります。

selectionBounds : rect [read-only]

タッチテキストの選択範囲から外れた矩形の位置。

touchSelectionCommandFlags : TouchSelectionCommandFlags [read-only, since QtWebEngine 6.3]

現在のタッチ選択メニューリクエストで利用可能な操作。

このプロパティは QtWebEngine 6.3 で導入されました。

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