From db1ec4efadf930cd8088286605128ae1d01d23e8 Mon Sep 17 00:00:00 2001 From: Venu Date: Tue, 3 Jun 2014 15:51:15 +0200 Subject: Doc: Added detailed description for WebView MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Moved the description from the overview page to the WebView type documentation. Also added an image corresponding to the snippet used. Task-number: QTBUG-36179 Change-Id: Iaf4207a36f774d93af9a881eae2162d44837eeee Reviewed-by: Jerome Pasion Reviewed-by: Topi Reiniƶ --- Source/WebKit/qt/docs/qtwebkit.qdoc | 1 + Source/WebKit/qt/docs/webview.png | Bin 0 -> 94324 bytes Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp | 60 ++++++++++++++-------- 3 files changed, 39 insertions(+), 22 deletions(-) create mode 100644 Source/WebKit/qt/docs/webview.png diff --git a/Source/WebKit/qt/docs/qtwebkit.qdoc b/Source/WebKit/qt/docs/qtwebkit.qdoc index e36cdeb62..f8f22fbd9 100644 --- a/Source/WebKit/qt/docs/qtwebkit.qdoc +++ b/Source/WebKit/qt/docs/qtwebkit.qdoc @@ -20,6 +20,7 @@ /*! \qmlmodule QtWebKit 3.0 \title Qt WebKit QML Types + \ingroup qmlmodules \brief Provides QML types for rendering web content within a QML application The QML types can be imported into your applciation using the following diff --git a/Source/WebKit/qt/docs/webview.png b/Source/WebKit/qt/docs/webview.png new file mode 100644 index 000000000..bde3eb457 Binary files /dev/null and b/Source/WebKit/qt/docs/webview.png differ diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp index a8dc93c98..a46b6972e 100644 --- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp +++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp @@ -1584,19 +1584,49 @@ QQuickWebPage* QQuickWebViewExperimental::page() \page qtwebkit-index.html \title Qt WebKit - The Qt WebKit module provides the WebView API which allows QML applications + The Qt WebKit module provides the WebView API, which allows QML applications to render regions of dynamic web content. A \e{WebView} component may share the screen with other QML components or encompass the full screen as specified within the QML application. - QML WebView version 3.0 is incompatible with previous QML \l - WebView API versions. It allows an - application to load pages into the WebView, either by URL or with - an HTML string, and navigate within session history. By default, - links to different pages load within the same WebView, but applications - may intercept requests to delegate links to other functions. + \section1 Getting Started - The following sample QML application loads a web page, responds to session + To use WebView in your QML document, add the following import statement: + + \code + import QtWebKit 3.0 + \endcode + + \note Qt WebKit 3.0 is incompatible with previous Qt WebKit versions. + + \section1 Examples + + There are several Qt WebKit examples located in the + \l{Qt WebKit Examples} page. + + \section1 See Also + + \list + \li \l {Qt WebKit QML Types}{QML Types} + \endlist + +*/ + + +/*! + \qmltype WebView + \instantiates QQuickWebView + \inqmlmodule QtWebKit + \brief A WebView renders web content within a QML application. + + \image webview.png + + WebView allows an application to load pages either by URL or an HTML + string, and navigate within the session history. By default, links to + different pages are loaded within the same WebView, but applications + can choose to delegate those links to other functions. + + The following example loads a web page, responds to session history context, and intercepts requests for external links. It also makes use of \l ScrollView from \l {Qt Quick Controls} to add scroll bars for the content area. @@ -1626,20 +1656,6 @@ QQuickWebPage* QQuickWebViewExperimental::page() } } \endcode - - \section1 Examples - - There are several Qt WebKit examples located in the - \l{Qt WebKit Examples} page. - -*/ - - -/*! - \qmltype WebView - \instantiates QQuickWebView - \inqmlmodule QtWebKit 3.0 - \brief A WebView renders web content within a QML application */ QQuickWebView::QQuickWebView(QQuickItem* parent) -- cgit v1.2.3