TouchSelectionMenuRequest QML Type
タッチ選択メニューを表示するリクエスト。もっと見る
Import Statement: | import QtWebEngine |
Since: | QtWebEngine 6.3 |
プロパティ
- accepted : bool
- selectionBounds : rect
詳細説明
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(); } // ... }
プロパティの説明
accepted : bool |
タッチ選択メニュー要求がシグナルハンドラによって処理されたかどうかを示す。
WebEngineView::touchSelectionMenuRequested のシグナルハンドラが実行された後、このプロパティがfalse
である場合、デフォルトのタッチ選択メニューが表示されます。これを防ぐには、request.accepted
をtrue
に設定する。
デフォルトはfalse
です。
注意: タッチ選択メニューのデフォルトの内容は、リクエストが実際に 生成された Web 要素によって異なります。
selectionBounds : rect |
タッチテキスト選択によるバインドされた矩形の位置。
© 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.