summaryrefslogtreecommitdiff
path: root/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine/doc/src/qquickwebengineview_lgpl.qdoc')
-rw-r--r--src/webengine/doc/src/qquickwebengineview_lgpl.qdoc142
1 files changed, 33 insertions, 109 deletions
diff --git a/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc b/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc
index 91aef7122..2f6ba7f0e 100644
--- a/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc
+++ b/src/webengine/doc/src/qquickwebengineview_lgpl.qdoc
@@ -2,7 +2,6 @@
* Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
* Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (c) 2012 Hewlett-Packard Development Company, L.P.
- * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -34,39 +33,27 @@
the screen with other QML components or encompass the full screen as
specified within the QML application.
- It allows an
- application to load pages into the WebEngineView, either by URL or with
- an HTML string, and navigate within session history. By default,
- links to different pages load within the same WebEngineView, but applications
- may intercept requests to delegate links to other functions.
+ It allows an application to load pages into the WebEngineView, either by URL or with
+ an HTML string, and navigate within session history. By default,
+ links to different pages load within the same WebEngineView, but web sites may
+ request them to be opened as a new tab, window or dialog.
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.
+ history context.
\code
- import QtQuick 2.0
- import QtQuick.Controls 1.0
+ import QtQuick 2.1
+ import QtQuick.Controls 1.1
import QtWebEngine 1.0
- ScrollView {
+ ApplicationWindow {
width: 1280
height: 720
+ visible: true
WebEngineView {
id: webview
- url: "http://qt-project.org"
+ url: "http://www.qt-project.org"
anchors.fill: parent
- onNavigationRequested: {
- // detect URL scheme prefix, most likely an external link
- var schemaRE = /^\w+:/;
- if (schemaRE.test(request.url)) {
- request.action = WebEngineView.AcceptRequest;
- } else {
- request.action = WebEngineView.IgnoreRequest;
- // delegate request.url here
- }
- }
}
}
\endcode
@@ -204,9 +191,10 @@
\li \c{url}: the location of the resource that is loading.
- \li \c{status}: Reflects one of three load states:
- \c{LoadStartedStatus}, \c{LoadSucceededStatus}, or
- \c{LoadFailedStatus}. See \c{WebEngineView::LoadStatus}.
+ \li \c{status}: Reflects one of four load states:
+ \c{LoadStartedStatus}, \c{LoadStoppedStatus},
+ \c{LoadSucceededStatus}, or \c{LoadFailedStatus}.
+ See \c{WebEngineView::LoadStatus}.
\li \c{errorString}: description of load error.
@@ -234,44 +222,6 @@
*/
/*!
- \qmlsignal WebEngineView::onNavigationRequested(request)
-
- Occurs for various kinds of navigation. If the application listens
- for this signal, it must set the \c{request.action} to either of the
- following \l{WebEngineView::NavigationRequestAction} enum values:
-
- \list
-
- \li \c{AcceptRequest}: Allow navigation to external pages within the
- web view. This represents the default behavior when no listener is
- active.
-
- \li \c{IgnoreRequest}: Suppress navigation to new pages within the web
- view. (The listener may then delegate navigation externally to
- the browser application.)
-
- \endlist
-
- The \a{request} also provides the following read-only values:
-
- \list
-
- \li \c{url}: The location of the requested page.
-
- \li \c{navigationType}: contextual information, one of
- \c{LinkClickedNavigation}, \c{BackForwardNavigation},
- \c{ReloadNavigation}, \c{FormSubmittedNavigation},
- \c{FormResubmittedNavigation}, or \c{OtherNavigation} enum values.
- See \l{WebEngineView::NavigationType}.
-
- \li \c{keyboardModifiers}: potential states for \l{Qt::KeyboardModifier}.
-
- \li \c{mouseButton}: potential states for \l{Qt::MouseButton}.
-
- \endlist
-*/
-
-/*!
\qmlproperty enumeration WebEngineView::ErrorDomain
Details various high-level error types.
@@ -287,7 +237,7 @@
\li Content fails to be interpreted by Qt WebEngine.
\row
- \li NetworkErrorDomain
+ \li ConnectionErrorDomain
\li Error results from faulty network connection.
\row
@@ -295,8 +245,16 @@
\li Error is produced by server.
\row
- \li DownloadErrorDomain
- \li Error in saving file.
+ \li CertificateErrorDomain
+ \li Error related to the SSL/TLS certficate.
+
+ \row
+ \li FtpErrorDomain
+ \li An error related to the file transfer protocol.
+
+ \row
+ \li DnsErrorDomain
+ \li An error related to DNS lookup.
\row
\li NoErrorDomain
@@ -306,9 +264,9 @@
*/
/*!
- \qmlproperty enumeration WebEngineView::NavigationType
+ \qmlproperty enumeration WebEngineView::JavaScriptConsoleMessageLevel
- Distinguishes context for various navigation actions.
+ Indicates the severity of a JavaScript console message.
\table
@@ -317,28 +275,16 @@
\li Description
\row
- \li LinkClickedNavigation
- \li Navigation via link.
+ \li InfoMessageLevel
+ \li Message is purely informative and should be safe to ignore.
\row
- \li FormSubmittedNavigation
- \li Form data is posted.
+ \li WarningMessageLevel
+ \li Message indicates there might be a problem that may need attention.
\row
- \li BackForwardNavigation
- \li Navigation back and forth within session history.
-
- \row
- \li ReloadNavigation
- \li The current page is reloaded.
-
- \row
- \li FormResubmittedNavigation
- \li Form data is re-posted.
-
- \row
- \li OtherNavigation
- \li Unspecified fallback method of navigation.
+ \li ErrorMessageLevel
+ \li Message indicates there has been an error.
\endtable
*/
@@ -368,25 +314,3 @@
\endtable
*/
-
-/*!
- \qmlproperty enumeration WebEngineView::NavigationRequestAction
-
- Specifies a policy when navigating a link to an external page.
-
- \table
-
- \header
- \li Constant
- \li Description
-
- \row
- \li AcceptRequest
- \li Allow navigation to external pages within the web view.
-
- \row
- \li IgnoreRequest
- \li Suppress navigation to new pages within the web view.
-
- \endtable
-*/