class QWebEngineFindTextResult

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

Synopsis

Properties

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

The string search can be initiated by the findText() or 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 findTextFinished() signals.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property activeMatchᅟ: int

This property holds The index of the currently highlighted match..

Access functions:
property numberOfMatchesᅟ: int

This property holds The number of matches found..

Access functions:
__init__()
__init__(other)
Parameters:

otherQWebEngineFindTextResult

activeMatch()
Return type:

int

Getter of property activeMatchᅟ .

numberOfMatches()
Return type:

int

Getter of property numberOfMatchesᅟ .