summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2016-01-11 10:37:31 +0100
committerMichael BrĂ¼ning <michael.bruning@theqtcompany.com>2016-01-19 15:14:40 +0000
commitf8ac9f0eb1745648750493cfbb16eed0d859b212 (patch)
tree470c45cb3110d6d5b368fabf771a6eb120dffd9f
parente7f4ddebc3f1a857b81d3468119cda9236513bf4 (diff)
Doc: link capturing methods
Task-number: QTBUG-48435 Change-Id: If7117ecb11a0f06df1204dc91757a29c5444e189 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
-rw-r--r--src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc7
-rw-r--r--src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc11
2 files changed, 17 insertions, 1 deletions
diff --git a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
index ca1309718..065e5a18b 100644
--- a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
@@ -279,5 +279,12 @@
\li In the latest HTML standard, any document element can be made editable through the
\c contentEditable attribute. So \c runJavaScript is all that is needed:
\c{page->runJavascript("document.documentElement.contentEditable = true")}
+ \row
+ \li QWebPage::setLinkDelegationPolicy
+ \li There is no way to connect a signal to run C++ code when a link is clicked. However,
+ link clicks can be delegated to the Qt application instead of having the HTML handler
+ engine process them by overloading the QWebEnginePage::acceptNavigationRequest()
+ function. This is necessary when an HTML document is used as part of the user interface,
+ and not to display external data, for example, when displaying a list of results.
\endtable
*/
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
index a6f015434..22eacfda9 100644
--- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
@@ -275,8 +275,17 @@
the specified navigation type \a type. \a isMainFrame indicates whether the request corresponds
to the main frame or a sub frame. If the function returns \c true, the navigation request is
accepted and \c url is loaded. The default implementation accepts all navigation requests.
-*/
+ This function is called for absolute URLs that are prefixed with \c {http://} or \c {https://}
+ and for unrecognized schemes, such as \c {mailto:}, which will be handled by QDesktopServices
+ if accepted. To have this function called also upon receiving navigation requests to local URLs,
+ prefix the URLs with \c {http://}.
+
+ Navigation requests can be delegated to the Qt application instead of having the HTML handler
+ engine process them by overloading this function. This is necessary when an HTML document is
+ used as part of the user interface, and not to display external data, for example, when
+ displaying a list of results.
+*/
/*!
\fn void QWebEnginePage::javaScriptAlert(const QUrl &securityOrigin, const QString& msg)