QWebEngineFindTextResult Class
QWebEngineFindTextResult クラスは、ページ上の文字列検索の結果をカプセル化します。詳細...
ヘッダー | #include <QWebEngineFindTextResult> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WebEngineCore) target_link_libraries(mytarget PRIVATE Qt6::WebEngineCore) |
qmake | QT += webenginecore |
QMLで: | FindTextResult |
プロパティ一覧
- activeMatch : const int
- numberOfMatches : const int
公共機能
int | activeMatch() const |
int | numberOfMatches() const |
詳細説明
文字列検索は、QWebEnginePage::findText() またはWebEngineView.findText() メソッドで開始できます。検索結果はビューでハイライト表示されます。この結果の詳細は QWebEngineFindTextResult オブジェクトとして渡され、"2 件中 2 件が一致" などのステータス・メッセージを表示するために使用できます。例えば
QObject::connect(view.page(), &)QWebEnginePage::findTextFinished, [](const QWebEngineFindTextResult &result) { {{{QWebEngineFindTextResult &result qInfo() << result.activeMatch() << "of" << result.numberOfMatches() << "matches"; });
結果は、QWebEnginePage::findTextFinished ()とWebEngineView.findTextFinished ()のシグナルでユーザーに渡される。
© 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.