diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2019-07-12 13:39:06 +0200 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2019-08-23 10:25:23 +0200 |
commit | a6abc01319798e2175914323273e91927516eba0 (patch) | |
tree | c7fe231f43e80cc4442c535442f41de1cd521fda /src/webengine/doc | |
parent | 55a4c28542c6dc9e4a4edc0aab7043feef2ab0d2 (diff) |
Introduce findTextFinished signal
This is a replacement for the callbacks. Also introduces
QWebEngineFindTextResult class what is common for the Quick and Widget
APIs. This makes possible to provide extra information about the match,
eg. the number of matches and the index of the currently highlighted match.
[ChangeLog][QtWebEngine][WebEngineView] Introduces findTextFinished
signal and FindTextResult type to provide extra information about the
result of a text search.
[ChangeLog][QtWebEngineWidgets][QWebEnginePage] Introduces
findTextFinished signal and QWebEngineFindTextResult class to provide
extra information about the result of a text search.
Task-number: QTBUG-50420
Change-Id: Icb9737d2f596e6bc0fc5733144eeeaf2a77aab02
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Diffstat (limited to 'src/webengine/doc')
-rw-r--r-- | src/webengine/doc/src/webengineview_lgpl.qdoc | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/webengine/doc/src/webengineview_lgpl.qdoc b/src/webengine/doc/src/webengineview_lgpl.qdoc index 1c4328d01..8f03774c8 100644 --- a/src/webengine/doc/src/webengineview_lgpl.qdoc +++ b/src/webengine/doc/src/webengineview_lgpl.qdoc @@ -414,26 +414,33 @@ \qmlmethod void WebEngineView::findText(string subString) \since QtWebEngine 1.1 Finds the specified string, \a subString, in the page. + The findTextFinished() signal is emitted when a string search is completed. To clear the search highlight, just pass an empty string. + + \sa findTextFinished() */ /*! \qmlmethod void WebEngineView::findText(string subString, FindFlags options) \since QtWebEngine 1.1 Finds the specified string, \a subString, in the page, using the given \a options. + The findTextFinished() signal is emitted when a string search is completed. To clear the search highlight, just pass an empty string. \code findText("Qt", WebEngineView.FindBackward | WebEngineView.FindCaseSensitively); \endcode + + \sa findTextFinished() */ /*! \qmlmethod void WebEngineView::findText(string subString, FindFlags options, variant resultCallback) \since QtWebEngine 1.1 Finds the specified string, \a subString, in the page, using the given \a options. + The findTextFinished() signal is emitted when a string search is completed. To clear the search highlight, just pass an empty string. @@ -447,6 +454,8 @@ console.log("Qt was found!"); }); \endcode + + \sa findTextFinished() */ /*! @@ -1569,5 +1578,39 @@ resource state is however completely safe. \sa lifecycleState, {WebEngine Lifecycle Example} +*/ + +/*! + \qmltype FindTextResult + \instantiates QWebEngineFindTextResult + \inqmlmodule QtWebEngine + \since QtWebEngine 1.11 + + \brief A utility type for encapsulating the result of a string search on a page. + + \sa WebEngineView::findTextFinished() +*/ + +/*! + \qmlproperty int FindTextResult::numberOfMatches + \readonly + + \brief The number of matches found. +*/ + +/*! + \qmlproperty int FindTextResult::activeMatchOrdinal + \readonly + + \brief The index of the currently highlighted match. +*/ + +/*! + \qmlsignal WebEngineView::findTextFinished(FindTextResult result) + \since QtWebEngine 1.11 + + This signal is emitted when a string search on a page is completed. \a result is + the result of the string search. + \sa findText(), FindTextResult */ |