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() 메서드로 시작할 수 있습니다. 검색 결과는 뷰에서 강조 표시됩니다. 이 결과의 세부 정보는 "2건 중 2건 일치"와 같은 상태 메시지를 표시하는 데 사용할 수 있는 QWebEngineFindTextResult 개체로 전달됩니다. 예를 들어
QObject::connect(view.page(), &QWebEnginePage::findTextFinished, [](const 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.