diff options
Diffstat (limited to 'Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp index 31a8d1a54..c89ee79fe 100644 --- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp +++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp @@ -1591,19 +1591,23 @@ QQuickWebPage* QQuickWebViewExperimental::page() links to different pages load within the same WebView, but applications may intercept requests to delegate links to other functions. - This sample QML application loads a web page, responds to session - history context, and intercepts requests for external links: + The following sample QML application 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. \code import QtQuick 2.0 + import QtQuick.Controls 1.0 import QtWebKit 3.0 - Page { + ScrollView { + width: 1280 + height: 720 WebView { id: webview url: "http://qt-project.org" - width: parent.width - height: parent.height + anchors.fill: parent onNavigationRequested: { // detect URL scheme prefix, most likely an external link var schemaRE = /^\w+:/; |