diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-02-04 13:50:57 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-02-04 14:13:39 +0100 |
commit | 6722bbbf4ea2ddcdd9194f26a883029ec3afc39a (patch) | |
tree | c3290b82fac21c4990be8472ae6cb4ca043205cf /src/webenginewidgets/doc | |
parent | 41d69eb0fa2375f0da6ba9b35136f5598be4b3a4 (diff) | |
parent | 82f4d13a13b40d9cb7710f6dd4190175a272a394 (diff) |
Merge branch '5.6' into dev
Change-Id: I0bb971f01ee1e02da768f336680c8ec0254ab2b0
Diffstat (limited to 'src/webenginewidgets/doc')
-rw-r--r-- | src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc | 7 | ||||
-rw-r--r-- | src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc | 14 | ||||
-rw-r--r-- | src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc | 4 |
3 files changed, 22 insertions, 3 deletions
diff --git a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc index 7b87ff7d9..99723c105 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 3b25bac76..a65d6011f 100644 --- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc @@ -283,8 +283,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) @@ -634,6 +643,9 @@ page.runJavaScript("document.title", [](const QVariant &v) { qDebug() << v.toString(); }); \endcode + \warning Do not execute lengthy routines in the callback function, because it might block the + rendering of the web engine page. + See scripts() for an alternative API to inject scripts. */ diff --git a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc index 9d03527e1..397b9f51b 100644 --- a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc +++ b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc @@ -75,9 +75,9 @@ If you want to provide support for web sites that allow the user to open new windows, such as pop-up windows, you can subclass QWebEngineView and reimplement the createWindow() function. + + \sa {WebEngine Demo Browser Example}, {WebEngine Content Manipulation Example}, {Markdown Editor Example} */ -// FIXME: reintroduce the following when we have proper names for the examples. -// \sa {WebEngine Tab Browser Example}, {WebEngine Fancy Browser Example} /*! |