summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenu <venugopal.shivashankar@digia.com>2014-06-03 15:51:15 +0200
committerVenugopal Shivashankar <venugopal.shivashankar@digia.com>2014-06-16 14:17:42 +0200
commitdb1ec4efadf930cd8088286605128ae1d01d23e8 (patch)
tree9daf138eb085e0c56c44972201fc56be3a974fc5
parentb6ddb5fe5d3f2223d524e45bf5cdbdde0e5b241f (diff)
Doc: Added detailed description for WebView
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 <jerome.pasion@digia.com> Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
-rw-r--r--Source/WebKit/qt/docs/qtwebkit.qdoc1
-rw-r--r--Source/WebKit/qt/docs/webview.pngbin0 -> 94324 bytes
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp60
3 files changed, 39 insertions, 22 deletions
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
--- /dev/null
+++ b/Source/WebKit/qt/docs/webview.png
Binary files 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)