QWebEngineFindTextResult — PyQt Documentation v6.9.0 (original) (raw)

PyQt6.QtWebEngineCore.QWebEngineFindTextResult

Description

The QWebEngineFindTextResult class encapsulates the result of a string search on a page.

The string search can be initiated by the findText() or WebEngineView.findText() method. The results of the search are highlighted in the view. The details of this result are passed as a QWebEngineFindTextResult object that can be used to show a status message, such as “2 of 2 matches”. For example:

QObject::connect(view.page(), &QWebEnginePage::findTextFinished, [](const QWebEngineFindTextResult &result) { qInfo() << result.activeMatch() << "of" << result.numberOfMatches() << "matches"; });

Results are passed to the user in the findTextFinished and WebEngineView.findTextFinished() signals.

Methods

__init__()

TODO


__init__(QWebEngineFindTextResult)

TODO


activeMatch() → int

TODO


numberOfMatches() → int

TODO