summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/doc/src
diff options
context:
space:
mode:
Diffstat (limited to 'src/webenginewidgets/doc/src')
-rw-r--r--src/webenginewidgets/doc/src/qtwebenginewidgets-examples.qdoc29
-rw-r--r--src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc38
-rw-r--r--src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc49
-rw-r--r--src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc28
-rw-r--r--src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc231
-rw-r--r--src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc851
-rw-r--r--src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc310
-rw-r--r--src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc43
8 files changed, 39 insertions, 1540 deletions
diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets-examples.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets-examples.qdoc
index a9e0e69ea..c9bd76bf4 100644
--- a/src/webenginewidgets/doc/src/qtwebenginewidgets-examples.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebenginewidgets-examples.qdoc
@@ -1,35 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\group webengine-widgetexamples
\title Qt WebEngine Widgets Examples
\brief Examples demonstrating the \QWE Widgets usage.
- \ingroup all-examples
Qt provides an integrated Web browser component based on Chromium, the popular
open source browser engine.
diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc
index b93bc86f2..8eb28b797 100644
--- a/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebenginewidgets-index.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page qtwebenginewidgets-index.html
@@ -34,14 +10,14 @@
\section1 Getting Started
- To include the definitions of the module's classes, use the
- following directive:
+ To link against the module, add this line to your qmake project file:
- \snippet qtwebengine_build_snippet.qdoc 1
+ \snippet qtwebenginewidgets_build_snippet.qdoc 0
- To link against the module, add this line to your qmake project file:
+ For build with CMake use the \c find_package() command to locate the needed module components
+ in the Qt6 package and \c target_link_libraries() to link against the module:
- \snippet qtwebengine_build_snippet.qdoc 0
+ \snippet qtwebenginewidgets_build_snippet.qdoc 2
\section1 Articles and Guides
diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
index 6f3eac5ad..ef5a1c4b5 100644
--- a/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\module QtWebEngineWidgets
@@ -32,18 +8,25 @@
\ingroup modules
\ingroup qtwebengine-modules
\qtvariable webenginewidgets
+ \qtcmakepackage WebEngineWidgets
- The \QWEWidgets module provides a web browser engine as well as C++ classes to render
+ The \QWE Widgets module provides a web browser engine as well as C++ classes to render
and interact with web content.
- To include the definitions of the module's classes, use the
- following directive:
-
- \snippet qtwebenginewidgets_build_snippet.qdoc 1
-
\if !defined(qtforpython)
- To link against the module, add the following to your qmake project file:
+ To link against the module using build with qmake,
+ add the following QT variable to your qmake .pro file:
\snippet qtwebenginewidgets_build_snippet.qdoc 0
+
+ For build with CMake use the \c find_package() command to locate the needed module components
+ in the Qt6 package and \c target_link_libraries() to link against the module:
+
+ \snippet qtwebenginewidgets_build_snippet.qdoc 2
\endif
+
+ The minimum amount of code needed to load and display an HTML page requires just
+ implementing the \c QWebEngineView class.
+
+ \snippet simple/main.cpp Minimal Example
*/
diff --git a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
index 9e8cc463c..37b73c010 100644
--- a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page qtwebenginewidgets-qtwebkitportingguide.html
diff --git a/src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc
deleted file mode 100644
index 5e3ebecb1..000000000
--- a/src/webenginewidgets/doc/src/qwebenginehistory_lgpl.qdoc
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- Copyright (C) 2015 The Qt Company Ltd.
- Copyright (C) 2008 Nokia Corporation 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
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-// The documentation in this file was imported from QtWebKit and is thus constrained
-// by its LGPL license. Documentation written from scratch for new methods should be
-// placed inline in the code as usual.
-
-/*!
- \class QWebEngineHistoryItem
- \brief The QWebEngineHistoryItem class represents one item in the history of a web engine page.
- \since 5.4
- \inmodule QtWebEngineWidgets
-
- Each web engine history item represents an entry in the history stack of a web page,
- containing information about the page, its location, and the time when it was last visited.
-
- \sa QWebEngineHistory, QWebEnginePage::history()
-*/
-
-/*!
- \fn QWebEngineHistoryItem::QWebEngineHistoryItem(const QWebEngineHistoryItem &other)
- Constructs a history item from \a other. The new item and \a other
- will share their data, and modifying either this item or \a other will
- modify both instances.
-*/
-
-/*!
- \fn QWebEngineHistoryItem &QWebEngineHistoryItem::operator=(const QWebEngineHistoryItem &other)
- Assigns the \a other history item to this. This item and \a other
- will share their data, and modifying either this item or \a other will
- modify both instances.
-*/
-
-/*!
- \fn QWebEngineHistoryItem::~QWebEngineHistoryItem()
- Destroys the history item.
-*/
-
-/*!
- \fn QUrl QWebEngineHistoryItem::originalUrl() const
- Returns the original URL associated with the history item.
-
- \sa url()
-*/
-
-/*!
- \fn QUrl QWebEngineHistoryItem::url() const
- Returns the URL associated with the history item.
-
- \sa originalUrl(), title(), lastVisited()
-*/
-
-/*!
- \fn QString QWebEngineHistoryItem::title() const
- Returns the title of the page associated with the history item.
-
- \sa url(), lastVisited()
-*/
-
-/*!
- \fn QDateTime QWebEngineHistoryItem::lastVisited() const
- Returns the date and time when the page associated with the item was last visited.
-
- \sa title(), url()
-*/
-
-/*!
- \fn bool QWebEngineHistoryItem::isValid() const
- Returns whether this is a valid history item.
-*/
-
-/*!
- \class QWebEngineHistory
- \brief The QWebEngineHistory class represents the history of a web engine page.
- \since 5.4
- \inmodule QtWebEngineWidgets
-
- Each web engine page contains a history of visited pages that can be accessed
- by QWebEnginePage::history().
-
- The history uses the concept of a \e{current item}, dividing the pages visited
- into those that can be visited by navigating \e back and \e forward using the
- back() and forward() functions. The current item can be obtained by calling
- currentItem(), and an arbitrary item in the history can be made the current
- item by passing it to goToItem().
-
- A list of items describing the pages that can be visited by going back can be
- obtained by calling the backItems() function; similarly, items describing the
- pages ahead of the current page can be obtained with the forwardItems() function.
- The total list of items is obtained with the items() function.
-
- Just as with containers, functions are available to examine the history in terms
- of a list. Arbitrary items in the history can be obtained with itemAt(), the total
- number of items is given by count(), and the history can be cleared with the
- clear() function.
-
- QWebEngineHistory's state can be saved to a QDataStream using the >> operator and loaded
- by using the << operator.
-
- \sa QWebEngineHistoryItem, QWebEnginePage
-*/
-
-/*!
- \fn void QWebEngineHistory::clear()
- Clears the history.
-
- \sa count(), items()
-*/
-
-/*!
- \fn QList<QWebEngineHistoryItem> QWebEngineHistory::items() const
- Returns a list of all items currently in the history.
-
- \sa count(), clear()
-*/
-
-/*!
- \fn QList<QWebEngineHistoryItem> QWebEngineHistory::backItems(int maxItems) const
- Returns the list of items in the backwards history list.
- At most \a maxItems entries are returned.
-
- \sa forwardItems()
-*/
-
-/*!
- \fn QList<QWebEngineHistoryItem> QWebEngineHistory::forwardItems(int maxItems) const
- Returns the list of items in the forward history list.
- At most \a maxItems entries are returned.
-
- \sa backItems()
-*/
-
-/*!
- \fn bool QWebEngineHistory::canGoBack() const
- Returns \c true if there is an item preceding the current item in the history;
- otherwise returns \c false.
-
- \sa canGoForward()
-*/
-
-/*!
- \fn bool QWebEngineHistory::canGoForward() const
- Returns \c true if we have an item to go forward to; otherwise returns \c false.
-
- \sa canGoBack()
-*/
-
-/*!
- \fn void QWebEngineHistory::back()
- Sets the current item to be the previous item in the history and goes to the
- corresponding page; that is, goes back one history item.
-
- \sa forward(), goToItem()
-*/
-
-/*!
- \fn void QWebEngineHistory::forward()
- Sets the current item to be the next item in the history and goes to the
- corresponding page; that is, goes forward one history item.
-
- \sa back(), goToItem()
-*/
-
-/*!
- \fn void QWebEngineHistory::goToItem(const QWebEngineHistoryItem &item)
- Sets the current item to be the specified \a item in the history and goes to the page.
-
- \sa back(), forward()
-*/
-
-/*!
- \fn QWebEngineHistoryItem QWebEngineHistory::backItem() const
- Returns the item before the current item in the history.
-*/
-
-/*!
- \fn QWebEngineHistoryItem QWebEngineHistory::currentItem() const
- Returns the current item in the history.
-*/
-
-/*!
- \fn QWebEngineHistoryItem QWebEngineHistory::forwardItem() const
- Returns the item after the current item in the history.
-*/
-
-/*!
- \fn int QWebEngineHistory::currentItemIndex() const
- Returns the index of the current item in history.
-*/
-
-/*!
- \fn QWebEngineHistoryItem QWebEngineHistory::itemAt(int i) const
- Returns the item at index \a i in the history.
-*/
-
-/*!
- \fn int QWebEngineHistory::count() const
- Returns the total number of items in the history.
-*/
-
-/*!
- \fn QDataStream& operator<<(QDataStream& stream, const QWebEngineHistory& history)
- \relates QWebEngineHistory
-
- Saves the web engine history \a history into \a stream.
-*/
-
-
-/*!
- \fn QDataStream& operator>>(QDataStream& stream, QWebEngineHistory& history)
- \relates QWebEngineHistory
-
- Loads the web engine history from \a stream into \a history.
-*/
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
deleted file mode 100644
index 9d5c41713..000000000
--- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
+++ /dev/null
@@ -1,851 +0,0 @@
-/*
- Copyright (C) 2019 The Qt Company Ltd.
- Copyright (C) 2008, 2009, 2012 Nokia Corporation and/or its subsidiary(-ies)
- Copyright (C) 2007 Staikos Computing Services Inc.
- Copyright (C) 2007 Apple Inc.
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-// The documentation in this file was imported from QtWebKit and is thus constrained
-// by its LGPL license. Documentation written from scratch for new methods should be
-// placed inline in the code as usual.
-
-/*!
- \class QWebEnginePage
- \brief The QWebEnginePage class provides an object to view and edit web documents.
- \since 5.4
- \inmodule QtWebEngineWidgets
-
- A \e {web engine page} holds the contents of an HTML document, the history of navigated
- links, and actions.
-
- QWebEnginePage's API is very similar to QWebEngineView, as you are still provided with
- common functions like action() (known as
- \l{QWebEngineView::pageAction()}{pageAction}() in QWebEngineView), triggerAction(),
- and findText().
-
- A page can be loaded using load() or setUrl(). Alternatively, if you have
- the HTML content readily available, you can use setHtml(). The GET method is
- always used to load URLs.
-
- The QWebEnginePage class also offers methods to retrieve both the URL currently
- loaded by the page (see url()) as well as the URL originally requested
- to be loaded (see requestedUrl()). These methods make possible the retrieval
- of the URL before and after a DNS resolution or a redirection occurs during
- the load process. The requestedUrl() also matches to the URL added to the
- page history (\l{QWebEngineHistory}) if load is successful.
-
- The title of an HTML page can be accessed with the title() property.
- Additionally, a page may also specify an icon, which can be accessed
- using the icon() or its URL using the iconUrl() property.
- If the title or the icon changes, the corresponding titleChanged(), iconChanged()
- and iconUrlChanged() signals will be emitted.
- The zoomFactor() property enables zooming the contents of the web page by a
- scale factor.
-
- The loadStarted() signal is emitted when the page begins to load, whereas the loadProgress()
- signal is emitted whenever an element of the web page completes loading, such as an embedded
- image or a script. The loadFinished() signal is emitted when the page contents
- have been loaded completely, independent of script execution or page rendering.
- Its argument, either \c true or \c false, indicates whether or not the load
- operation succeeded.
-
- An HTML document is loaded in a \e {main frame} within the web page. If it references
- \e {child frames} (as defined by the \c <frame> or \c <iframe> elements), they are considered
- part of the content. Child frames are individually accessible only through JavaScript.
-
- Web sites define \e {security origin} for safely accessing each other's resources for
- client-side scripting or databases. An origin consist of a host name, a scheme, and a port
- number. For example, the sites \c http://www.example.com/my/page.html and
- \c http://www.example.com/my/overview.html are allowed to share the same database or access
- each other's documents when used in HTML frame sets and JavaScript. At the same time,
- \c http://www.malicious.com/evil.html is prevented from accessing the resources of
- \c http://www.example.com/, because they are of a different security origin.
- By default, local schemes like \c file:// and \c qrc:// are considered to be in the same
- security origin, and can access each other's resources. Local resources are by default
- restricted from accessing remote content, which means that \c file:// will not be able to
- access \c http://domain.com/foo.html.
-
- Scripts can be executed on the web page by using runJavaScript(), either in the main
- JavaScript \e world, along with the rest of the JavaScript coming from the web contents, or in
- their own isolated world. While the DOM of the page can be accessed from any world, JavaScript
- variables of a function defined in one world are not accessible from a different one.
- QWebEngineScript::ScriptWorldId provides some predefined IDs for this purpose. Using the
- \c runJavaScript() version without the world ID is the same as running the script in the
- \c MainWorld.
-
- The \l {QWebEngineSettings::FocusOnNavigationEnabled} {FocusOnNavigationEnabled} setting can be
- used to make the view associated with the page automatically receive focus when a navigation
- operation occurs (like loading or reloading a page or navigating through history).
-*/
-
-/*!
- \enum QWebEnginePage::FindFlag
-
- This enum describes the options available to the findText() function. The options
- can be OR-ed together from the following list:
-
- \value FindBackward Searches backwards instead of forwards.
- \value FindCaseSensitively By default findText() works case insensitive. Specifying this option
- changes the behavior to a case sensitive find operation.
-*/
-
-/*!
- \enum QWebEnginePage::WebAction
-
- This enum describes the types of action which can be performed on the web page.
-
- Actions only have an effect when they are applicable.
-
- The availability of actions can be be determined by checking
- \l{QAction::}{isEnabled()} on the action returned by action().
-
- \value NoWebAction No action is triggered.
- \value Back Navigate back in the history of navigated links.
- \value Forward Navigate forward in the history of navigated links.
- \value Stop Stop loading the current page.
- \value Reload Reload the current page.
- \value ReloadAndBypassCache Reload the current page, but do not use any local cache.
- \value Cut Cut the content currently selected into the clipboard.
- \value Copy Copy the content currently selected into the clipboard.
- \value Paste Paste content from the clipboard.
- \value Undo Undo the last editing action.
- \value Redo Redo the last editing action.
- \value SelectAll Select all content. This action is only enabled when the page's content is focused.
- The focus can be forced by the JavaScript \c{window.focus()} call, or the
- \l{QWebEngineSettings::FocusOnNavigationEnabled} {FocusOnNavigationEnabled} setting
- should be enabled to get automatic focus.
- \value PasteAndMatchStyle Paste content from the clipboard with current style.
-
- \value OpenLinkInThisWindow Open the current link in the current window. (Added in Qt 5.6)
- \value OpenLinkInNewWindow Open the current link in a new window. Requires implementation of
- \l createWindow(). (Added in Qt 5.6)
- \value OpenLinkInNewTab Open the current link in a new tab. Requires implementation of
- \l createWindow(). (Added in Qt 5.6)
- \value OpenLinkInNewBackgroundTab Open the current link in a new background tab. Requires
- implementation of \l createWindow(). (Added in Qt 5.7)
- \value CopyLinkToClipboard Copy the current link to the clipboard. (Added in Qt 5.6)
-
- \value CopyImageToClipboard Copy the clicked image to the clipboard. (Added in Qt 5.6)
- \value CopyImageUrlToClipboard Copy the clicked image's URL to the clipboard. (Added in Qt 5.6)
- \value CopyMediaUrlToClipboard Copy the hovered audio or video's URL to the clipboard. (Added in Qt 5.6)
- \value ToggleMediaControls Toggle between showing and hiding the controls for the hovered audio
- or video element. (Added in Qt 5.6)
- \value ToggleMediaLoop Toggle whether the hovered audio or video should loop on completetion or
- not. (Added in Qt 5.6)
- \value ToggleMediaPlayPause Toggle the play/pause state of the hovered audio or video element.
- (Added in Qt 5.6)
- \value ToggleMediaMute Mute or unmute the hovered audio or video element. (Added in Qt 5.6)
- \value DownloadLinkToDisk Download the current link to the disk. Requires a slot for
- \l{QWebEngineProfile::}{downloadRequested()}. (Added in Qt 5.6)
- \value DownloadImageToDisk Download the highlighted image to the disk. Requires a slot for
- \l{QWebEngineProfile::}{downloadRequested()}. (Added in Qt 5.6)
- \value DownloadMediaToDisk Download the hovered audio or video to the disk. Requires a slot for
- \l{QWebEngineProfile::}{downloadRequested()}. (Added in Qt 5.6)
-
- \value InspectElement Trigger any attached Web Inspector to inspect the highlighed element.
- (Added in Qt 5.6)
- \value ExitFullScreen Exit the fullscreen mode. (Added in Qt 5.6)
- \value RequestClose Request to close the web page. If defined, the \c{window.onbeforeunload}
- handler is run, and the user can confirm or reject to close the page. If the close
- request is confirmed, \c windowCloseRequested is emitted. (Added in Qt 5.6)
- \value Unselect Clear the current selection. (Added in Qt 5.7)
- \value SavePage Save the current page to disk. MHTML is the default format that is used to store
- the web page on disk. Requires a slot for \l{QWebEngineProfile::}{downloadRequested()}.
- (Added in Qt 5.7)
- \value ViewSource Show the source of the current page in a new tab. Requires implementation of
- \l createWindow(). (Added in Qt 5.8)
-
- \value ToggleBold
- Toggles boldness for the selection or at the cursor position.
- Requires \c contenteditable="true". (Added in Qt 5.10)
- \value ToggleItalic
- Toggles italics for the selection or at the cursor position.
- Requires \c contenteditable="true". (Added in Qt 5.10)
- \value ToggleUnderline
- Toggles underlining of the selection or at the cursor position.
- Requires \c contenteditable="true". (Added in Qt 5.10)
- \value ToggleStrikethrough
- Toggles striking through the selection or at the cursor position.
- Requires \c contenteditable="true". (Added in Qt 5.10)
-
- \value AlignLeft
- Aligns the lines containing the selection or the cursor to the left.
- Requires \c contenteditable="true". (Added in Qt 5.10)
- \value AlignCenter
- Aligns the lines containing the selection or the cursor at the center.
- Requires \c contenteditable="true". (Added in Qt 5.10)
- \value AlignRight
- Aligns the lines containing the selection or the cursor to the right.
- Requires \c contenteditable="true". (Added in Qt 5.10)
- \value AlignJustified
- Stretches the lines containing the selection or the cursor so that each
- line has equal width.
- Requires \c contenteditable="true". (Added in Qt 5.10)
- \value Indent
- Indents the lines containing the selection or the cursor.
- Requires \c contenteditable="true". (Added in Qt 5.10)
- \value Outdent
- Outdents the lines containing the selection or the cursor.
- Requires \c contenteditable="true". (Added in Qt 5.10)
-
- \value InsertOrderedList
- Inserts an ordered list at the current cursor position, deleting the current selection.
- Requires \c contenteditable="true". (Added in Qt 5.10)
- \value InsertUnorderedList
- Inserts an unordered list at the current cursor position,
- deleting the current selection.
- Requires \c contenteditable="true". (Added in Qt 5.10)
- \omitvalue WebActionCount
-
-*/
-
-/*!
- \enum QWebEnginePage::WebWindowType
-
- This enum describes the types of window that can be created by the createWindow() function:
-
- \value WebBrowserWindow
- A complete web browser window.
- \value WebBrowserTab
- A web browser tab.
- \value WebDialog
- A window without decoration.
- \value WebBrowserBackgroundTab
- A web browser tab without hiding the current visible WebEngineView. (Added in Qt 5.7)
-*/
-
-/*!
- \enum QWebEnginePage::JavaScriptConsoleMessageLevel
-
- This enum describes the different severity levels a JavaScript console message can have:
-
- \value InfoMessageLevel The message is purely informative and can safely be ignored.
- \value WarningMessageLevel The message informs about unexpected behavior or errors that may
- need attention.
- \value ErrorMessageLevel The message indicates there has been an error.
-*/
-
-/*!
- \enum QWebEnginePage::FileSelectionMode
-
- This enum indicates whether the implementation of the chooseFiles() function should
- return only one file or may return multiple files:
-
- \value FileSelectOpen
- Return only one file name.
- \value FileSelectOpenMultiple
- Return multiple file names.
-
- \sa chooseFiles()
-*/
-
-/*!
- \enum QWebEnginePage::PermissionPolicy
-
- This enum describes the permission policies that the user may set for data or device access:
-
- \value PermissionUnknown It is unknown whether the user grants or denies permission.
- \value PermissionGrantedByUser The user has granted permission.
- \value PermissionDeniedByUser The user has denied permission.
-
- \sa featurePermissionRequested(), featurePermissionRequestCanceled(), setFeaturePermission(), Feature
-*/
-
-/*!
- \enum QWebEnginePage::NavigationType
-
- This enum describes the type of a navigation request:
-
- \value NavigationTypeLinkClicked The navigation request resulted from a clicked link.
- \value NavigationTypeTyped The navigation request resulted from an explicitly loaded URL.
- \value NavigationTypeFormSubmitted The navigation request resulted from a form submission.
- \value NavigationTypeBackForward The navigation request resulted from a back or forward action.
- \value NavigationTypeReload The navigation request resulted from a reload action.
- \value NavigationTypeRedirect The navigation request resulted from a content or server controlled redirect. This also includes automatic reloads. (Added in Qt 5.14)
- \value NavigationTypeOther The navigation request was triggered by other means not covered by the above.
-
- \sa acceptNavigationRequest()
-*/
-
-/*!
- \enum QWebEnginePage::Feature
-
- This enum describes the platform feature access categories that the user may be asked to grant
- or deny access to:
-
- \value Notifications
- Web notifications for the end-user.
- \value Geolocation
- Location hardware or service.
- \value MediaAudioCapture
- Audio capture devices, such as microphones.
- \value MediaVideoCapture
- Video devices, such as cameras.
- \value MediaAudioVideoCapture
- Both audio and video capture devices.
- \value MouseLock
- Mouse locking, which locks the mouse pointer to the web view and is typically used in
- games.
- \value DesktopVideoCapture
- Video output capture, that is, the capture of the user's display,
- for screen sharing purposes for example. (Added in Qt 5.10)
- \value DesktopAudioVideoCapture
- Both audio and video output capture. (Added in Qt 5.10)
-
- \sa featurePermissionRequested(), featurePermissionRequestCanceled(), setFeaturePermission(), PermissionPolicy
-
-*/
-
-/*!
- \fn QWebEnginePage::QWebEnginePage(QObject *parent)
- Constructs an empty QWebEnginePage with the parent \a parent.
-*/
-
-/*!
- \fn QWebEnginePage::~QWebEnginePage()
- Destroys the web page.
-*/
-
-/*!
- \fn QWebEngineHistory *QWebEnginePage::history() const
- Returns a pointer to the view's history of navigated web pages.
-*/
-
-/*!
- \fn void QWebEnginePage::setView(QWidget* view)
- Sets the \a view that is associated with the web page.
-
- \sa view()
-*/
-
-/*!
- \fn QWidget *QWebEnginePage::view() const
- Returns the view widget that is associated with the web page.
-
- \sa setView()
-*/
-
-/*!
- \fn QMenu *QWebEnginePage::createStandardContextMenu()
- Creates the standard context menu which is shown when
- the user clicks on the web page with the right mouse button. It is
- called from the default \l{QWidget::}{contextMenuEvent()} handler. The popup menu's
- ownership is transferred to the caller.
-
- Returns \c nullptr if the context menu data is not initialized, for example when it
- is called when there is actually no context menu requested.
- */
-
-/*!
- \fn void QWebEnginePage::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message, int lineNumber, const QString& sourceID)
- This function is called when a JavaScript program tries to print the \a message to the web
- browser's console.
-
- For example, in case of evaluation errors the source URL may be provided in \a sourceID as well
- as the \a lineNumber.
-
- \a level indicates the severity of the event that triggered the message. That is, whether it
- was triggered by an error or a less severe event.
-
- Since Qt 5.6, the default implementation logs the messages in a \c js
- \l{QLoggingCategory}{logging category}.
-
- \sa{Console Logging}
-*/
-
-/*!
- \fn bool QWebEnginePage::acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame)
- \since 5.5
- This function is called upon receiving a request to navigate to the specified \a url by means of
- the specified navigation type \a type. \a isMainFrame indicates whether the request corresponds
- to the main frame or a child 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.
-
- \note The loading process is started and the loadStarted() signal is emitted
- \e before the request is accepted or rejected. Therefore, a loadFinished()
- signal that returns \c false is to be expected even after delegating the
- request.
-
- The \l{QWebEngineUrlRequestInterceptor} class offers further options for intercepting and
- manipulating requests.
-*/
-
-/*!
- \fn void QWebEnginePage::javaScriptAlert(const QUrl &securityOrigin, const QString& msg)
- This function is called whenever a JavaScript program running in a frame affiliated with
- \a securityOrigin calls the \c alert() function with the message \a msg.
-
- The default implementation shows the message, \a msg, with QMessageBox::information.
-*/
-
-/*!
- \fn bool QWebEnginePage::javaScriptConfirm(const QUrl &securityOrigin, const QString& msg)
- This function is called whenever a JavaScript program running in a frame affiliated with
- \a securityOrigin calls the \c confirm() function with the message \a msg. Returns \c true
- if the user confirms the message; otherwise returns \c false.
-
- It is also called when the \c onbeforeunload handler is requesting a confirmation before
- leaving a page.
-
- The default implementation executes the query using QMessageBox::information with QMessageBox::Ok and QMessageBox::Cancel buttons.
-*/
-
-/*!
- \fn bool QWebEnginePage::javaScriptPrompt(const QUrl &securityOrigin, const QString& msg, const QString& defaultValue, QString* result)
- This function is called whenever a JavaScript program running in a frame affiliated with \a securityOrigin tries to prompt the user for input.
- The program may provide an optional message, \a msg, as well as a default value for the input in \a defaultValue.
-
- If the prompt was cancelled by the user, the implementation should return \c false; otherwise the
- result should be written to \a result and \c true should be returned. If the prompt was not
- cancelled by the user, the implementation should return \c true and the result string must not
- be null.
-
- The default implementation uses QInputDialog::getText().
-*/
-
-/*!
- \fn QWebEnginePage *QWebEnginePage::createWindow(WebWindowType type)
- This function is called to create a new window of the specified \a type. For example, when a
- JavaScript program requests to open a document in a new window.
-
- If the new window can be created, the new window's QWebEnginePage is returned; otherwise a null pointer is returned.
-
- If the view associated with the web page is a QWebEngineView object, then the default implementation forwards
- the request to QWebEngineView::createWindow(); otherwise it returns a null pointer.
-
- \note In the cases when the window creation is being triggered by JavaScript, apart from
- reimplementing this method the application must also set
- QWebEngineSettings::JavascriptCanOpenWindows to \c true in order for the method to get called.
-
- \sa QWebEngineView::createWindow()
-*/
-
-/*!
- \fn void QWebEnginePage::triggerAction(WebAction action, bool checked = false)
- This function can be called to trigger the specified \a action.
- It is also called by \QWE if the user triggers the action, for example
- through a context menu item.
-
- If \a action is a checkable action, then \a checked specifies whether the action
- is toggled or not.
-
- \sa action()
-*/
-
-/*!
- \property QWebEnginePage::hasSelection
- \brief Whether this page contains selected content or not.
-
- \sa selectionChanged()
-*/
-
-/*!
- \property QWebEnginePage::selectedText
- \brief The text currently selected.
-
- By default, this property contains an empty string.
-
- \sa selectionChanged()
-*/
-
-/*!
- \fn QAction *QWebEnginePage::action(WebAction action) const
- Returns a QAction for the specified WebAction \a action.
-
- The action is owned by the QWebEnginePage but you can customize the look by
- changing its properties.
-
- QWebEnginePage also takes care of implementing the action, so that upon
- triggering the corresponding action is performed on the page.
-
- \sa triggerAction()
-*/
-
-/*!
- \fn void QWebEnginePage::findText(const QString &subString, QWebEnginePage::FindFlags options = FindFlags(), const QWebEngineCallback<bool> &resultCallback = QWebEngineCallback<bool>())
- Finds the specified string, \a subString, in the page, using the given \a options.
- The findTextFinished() signal is emitted when a string search is completed.
-
- To clear the search highlight, just pass an empty string.
-
- The \a resultCallback must take a boolean parameter. It will be called with a value of \c true
- if the \a subString was found; otherwise the callback value will be \c false.
-
- \warning We guarantee that the callback (\a resultCallback) is always called, but it might be done
- during page destruction. When QWebEnginePage is deleted, the callback is triggered with an invalid
- value and it is not safe to use the corresponding QWebEnginePage or QWebEngineView instance inside it.
-
- For example:
- \snippet qtwebengine_qwebenginepage_snippet.cpp 0
-
- \sa findTextFinished()
-*/
-
-/*!
- \fn QWebEngineSettings *QWebEnginePage::settings() const
- Returns a pointer to the page's settings object.
-
- \sa QWebEngineSettings::defaultSettings()
-*/
-
-/*!
- \fn bool QWebEnginePage::certificateError(const QWebEngineCertificateError & certificateError)
- This function is called when an invalid certificate error is raised while loading a given request.
-
- The \a certificateError parameter contains information about the certificate and details of the error.
-
- Return \c true to ignore the error and complete the request. Return \c false to stop loading
- the request.
-
- \note If the error was successfully deferred then the returned value will be ignored.
-
- \sa QWebEngineCertificateError
-*/
-
-/*!
- \fn QString QWebEnginePage::chooseFiles(FileSelectionMode mode, const QStringList& oldFiles, const QStringList& acceptedMimeTypes)
- This function is called when the web content requests a file name, for example
- as a result of the user clicking on a file upload button in an HTML form.
-
- \a mode indicates whether only one file or multiple files are expected to be returned.
-
- A suggested filename may be provided as the first entry of \a oldFiles. \a acceptedMimeTypes is ignored by the default implementation,
- but might be used by overrides.
-*/
-
-/*!
- \fn void QWebEnginePage::loadStarted()
-
- This signal is emitted when a page starts loading content.
-
- \sa loadFinished(), acceptNavigationRequest()
-*/
-
-/*!
- \fn void QWebEnginePage::loadProgress(int progress)
-
- This signal is emitted when the global progress status changes.
- The current value is provided by \a progress and scales from 0 to 100,
- which is the default range of QProgressBar.
- It accumulates changes from all the child frames.
-
-*/
-
-/*!
- \fn void QWebEnginePage::loadFinished(bool ok)
-
- This signal is emitted when the page finishes loading content. This signal
- is independent of script execution or page rendering.
- \a ok will indicate whether the load was successful or any error occurred.
-
- \note Navigation requests can be delegated to the Qt application instead
- of having the HTML handler engine process them by overloading the
- acceptNavigationRequest() function. Because the loading process is started
- and the loadStarted() signal is emitted \e before the request is accepted
- or rejected, a \c loadFinished() signal that returns \c false is to be
- expected even after delegating the request.
-
- \sa loadStarted(), acceptNavigationRequest()
-*/
-
-/*!
- \fn void QWebEnginePage::selectionChanged()
-
- This signal is emitted whenever the selection changes, either interactively
- or programmatically. For example, by calling triggerAction() with a selection action.
-
- \note When using the mouse to select text by left-clicking and dragging, the signal will be
- emitted for each new character selected, and not upon releasing the left mouse button.
-
- \sa selectedText()
-*/
-
-/*!
- \fn void QWebEnginePage::linkHovered(const QString &url)
-
- This signal is emitted when the mouse hovers over a link.
- \a url contains the target URL of the link.
-*/
-
-/*!
-
- \fn void QWebEnginePage::authenticationRequired(const QUrl &requestUrl, QAuthenticator *authenticator)
-
- This signal is emitted when access to \a requestUrl requires authentication.
- \a authenticator should be used to pass the user name and password for the connection.
-*/
-
-/*!
- \fn void QWebEnginePage::proxyAuthenticationRequired(const QUrl &requestUrl, QAuthenticator *authenticator, const QString &proxyHost)
-
- This signal is emitted when access to \a requestUrl via \a proxyHost requires authentication for the proxy.
- \a authenticator should be used to pass the user name and password for the connection.
-
-*/
-
-/*!
- \fn void QWebEnginePage::geometryChangeRequested(const QRect& geom)
-
- This signal is emitted whenever the document wants to change the position and size of the
- page to \a geom. This can happen for example through JavaScript.
-
- \note \l{QWindow::}{setGeometry()} expects a size excluding the window
- decoration, while \a geom includes it. You have to remove the size of the frame margins
- from \a geom to handle this signal correctly.
-
- \code
- window->setGeometry(geom.marginsRemoved(window->frameMargins()));
- \endcode
-*/
-
-/*!
- \fn void QWebEnginePage::windowCloseRequested()
-
- This signal is emitted whenever the page requests the web browser window to be closed,
- for example through the JavaScript \c{window.close()} call.
-
- \sa RequestClose
-*/
-
-/*!
- \fn void QWebEnginePage::toHtml(const QWebEngineCallback<const QString &> &resultCallback) const
- Asynchronous method to retrieve the page's content as HTML, enclosed in HTML and BODY tags.
- Upon successful completion, \a resultCallback is called with the page's content.
-
- \note \a resultCallback can be any of a function pointer, a functor or a lambda, and it is expected to take a QString parameter.
-
- \warning We guarantee that the callback (\a resultCallback) is always called, but it might be done
- during page destruction. When QWebEnginePage is deleted, the callback is triggered with an invalid
- value and it is not safe to use the corresponding QWebEnginePage or QWebEngineView instance inside it.
-
- \sa setHtml(), toPlainText()
-*/
-
-/*!
- \fn void QWebEnginePage::toPlainText(const QWebEngineCallback<const QString &> &resultCallback) const
- Asynchronous method to retrieve the page's content converted to plain text, completely stripped of all
- HTML formatting.
- Upon successful completion, \a resultCallback is called with the page's content.
-
- \note \a resultCallback can be any of a function pointer, a functor or a lambda, and it is expected to take a QString parameter.
-
- \warning We guarantee that the callback (\a resultCallback) is always called, but it might be done
- during page destruction. When QWebEnginePage is deleted, the callback is triggered with an invalid
- value and it is not safe to use the corresponding QWebEnginePage or QWebEngineView instance inside it.
-
- \sa toHtml()
-*/
-
-/*!
- \property QWebEnginePage::title
- \brief The title of the page as defined by the HTML \c <title> element.
-
- If the page has no \c <title> element, then the URL is used instead. For \c
- file:// URLs only the filename is used and not the full path.
-
- By default, before any content has been loaded, this property contains an
- empty string.
-
- \sa titleChanged()
-*/
-
-/*!
- \property QWebEnginePage::url
- \brief The URL of the page currently viewed.
-
- Setting this property clears the view and loads the URL.
-
- By default, this property contains an empty, invalid URL.
-
- \sa urlChanged()
-*/
-
-/*!
- \property QWebEnginePage::requestedUrl
- \brief The URL that was originally requested to be loaded by the page
- that is currently viewed.
-
- \note The URL may differ from the one returned by url(), which is the actual
- URL that results from DNS resolution or redirection.
-
- \sa url(), setUrl()
-*/
-
-/*!
- \fn void QWebEnginePage::load(const QUrl &url)
- Loads \a url into this page.
-
- \note The view remains the same until enough data has arrived to display the new URL.
-
- \sa setUrl(), setHtml(), setContent()
-*/
-
-/*!
- \fn void QWebEnginePage::setHtml(const QString &html, const QUrl &baseUrl)
- Sets the content of this page to \a html. \a baseUrl is optional and used to resolve relative
- URLs in the document, such as referenced images or stylesheets.
-
- The \a html is loaded immediately; external objects are loaded asynchronously.
-
- If a script in the \a html runs longer than the default script timeout (currently 10 seconds),
- for example due to being blocked by a modal JavaScript alert dialog, this method will return
- as soon as possible after the timeout and any subsequent \a html will be loaded asynchronously.
-
- When using this method, the web engine assumes that external resources, such as JavaScript programs or style
- sheets, are encoded in UTF-8 unless otherwise specified. For example, the encoding of an external
- script can be specified through the charset attribute of the HTML script tag. It is also possible
- for the encoding to be specified by the web server.
-
- This is a convenience function equivalent to setContent(html, "text/html", baseUrl).
-
- \note This method will not affect session or global history for the page.
-
- \warning This function works only for HTML, for other mime types (such as XHTML and SVG)
- setContent() should be used instead.
-
- \warning The content will be percent encoded before being sent to the renderer via IPC.
- This may increase its size. The maximum size of the percent encoded content is
- 2 megabytes minus 30 bytes.
-
- \sa toHtml(), setContent(), load()
-*/
-
-/*!
- \fn void QWebEnginePage::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
- Sets the content of the web page to \a data. If the \a mimeType argument
- is empty, it is assumed that the content is \c{text/plain,charset=US-ASCII}.
-
- External objects referenced in the content are located relative to \a baseUrl.
-
- The \a data is loaded immediately; external objects are loaded asynchronously.
-
- \note This method will not affect session or global history for the page.
-
- \warning The content will be percent encoded before being sent to the renderer via IPC.
- This may increase its size. The maximum size of the percent encoded content is
- 2 megabytes minus 6 bytes plus the length of the mime type string.
-
- \sa toHtml(), setHtml()
-*/
-
-/*!
- \property QWebEnginePage::zoomFactor
- \brief The zoom factor for the page content.
-
- Valid values are within the range from \c{0.25} to \c{5.0}. The default factor is \c{1.0}.
-*/
-
-/*!
- \fn void QWebEnginePage::runJavaScript(const QString &scriptSource, quint32 worldId, const QWebEngineCallback<const QVariant &> &resultCallback)
- \fn void QWebEnginePage::runJavaScript(const QString &scriptSource, quint32 worldId)
- \fn void QWebEnginePage::runJavaScript(const QString& scriptSource)
- \fn void QWebEnginePage::runJavaScript(const QString &scriptSource, const QWebEngineCallback<const QVariant &> &resultCallback)
- \since 5.7
-
- Runs the JavaScript code contained in \a scriptSource without checking
- whether the DOM of the page has been constructed. If you need more
- control over how the script is run, consider using \l scripts() instead.
-
- To avoid conflicts with other scripts executed on the page, the world in
- which the script is run is specified by \a worldId. The world ID values are
- the same as provided by QWebEngineScript::ScriptWorldId, and between \c 0
- and \c 256. If you leave out the \c world ID, the script is run in the
- \c MainWorld.
-
- When the script has been executed, \a resultCallback is called with the result of the last
- executed statement. \c resultCallback can be any of a function pointer, a functor or a lambda,
- and it is expected to take a QVariant parameter. For example:
-
- \code
- page.runJavaScript("document.title", [](const QVariant &v) { qDebug() << v.toString(); });
- \endcode
-
- Only plain data can be returned from JavaScript as the result value.
- Supported data types include all of the JSON data types as well as, for
- example, \c{Date} and \c{ArrayBuffer}. Unsupported data types include, for
- example, \c{Function} and \c{Promise}.
-
- \warning Do not execute lengthy routines in the callback function, because it might block the
- rendering of the web engine page.
-
- \warning We guarantee that the callback (\a resultCallback) is always called, but it might be done
- during page destruction. When QWebEnginePage is deleted, the callback is triggered with an invalid
- value and it is not safe to use the corresponding QWebEnginePage or QWebEngineView instance inside it.
-
- \sa scripts(), QWebEngineScript::ScriptWorldId, {Script Injection}
-*/
-
-/*!
- \fn void QWebEnginePage::setFeaturePermission(const QUrl &securityOrigin, Feature feature, PermissionPolicy policy)
-
- Sets the permission for the web site identified by \a securityOrigin to use \a feature to \a policy.
-
- \note This method is primarily for calling after a featurePermissionRequested() signal has been emitted
- to trigger the feature permission response. It can also be called before a request has been emitted,
- but will only set a granted permission for passive checks, mainly for Notification APIs that can check
- if permission has already been granted before explicitly requesting it.
-
- \sa featurePermissionRequested(), featurePermissionRequestCanceled()
-*/
-
-/*!
- \fn void QWebEnginePage::featurePermissionRequested(const QUrl &securityOrigin, Feature feature)
-
- This signal is emitted when the web site identified by \a securityOrigin requests to make use of
- the resource or device identified by \a feature.
-
- \sa featurePermissionRequestCanceled(), setFeaturePermission()
-*/
-
-/*!
- \fn void QWebEnginePage::featurePermissionRequestCanceled(const QUrl &securityOrigin, Feature feature)
-
- This signal is emitted when the web site identified by \a securityOrigin cancels a previously issued
- request to make use of \a feature.
-
- \sa featurePermissionRequested(), setFeaturePermission()
-
-*/
-
-/*!
- \fn void QWebEnginePage::titleChanged(const QString &title)
-
- This signal is emitted whenever the title of the page changes.
- The \a title string specifies the new title.
-
- \sa title()
-*/
-
-/*!
- \fn void QWebEnginePage::urlChanged(const QUrl &url)
-
- This signal is emitted with the URL of the page when the page title is
- received. The new URL is specified by \a url.
-
- \sa url()
-*/
diff --git a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
deleted file mode 100644
index b83da9440..000000000
--- a/src/webenginewidgets/doc/src/qwebenginesettings_lgpl.qdoc
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- Copyright (C) 2015 The Qt Company Ltd.
- Copyright (C) 2008 Nokia Corporation 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
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-// The documentation in this file was imported from QtWebKit and is thus constrained
-// by its LGPL license. Documentation written from scratch for new methods should be
-// placed inline in the code as usual.
-
-#if QT_DEPRECATED_SINCE(5, 5)
-/*!
- \fn static QWebEngineSettings *QWebEngineSettings::globalSettings()
- \obsolete
-
- Use defaultSettings() instead.
-*/
-#endif
-
-/*!
- \class QWebEngineSettings
- \since 5.4
- \brief The QWebEngineSettings class provides an object to store the settings used
- by QWebEnginePage.
-
- \inmodule QtWebEngineWidgets
-
- QWebEngineSettings allows configuration of browser properties, such as font sizes and
- families, the location of a custom style sheet, and generic attributes, such as JavaScript
- support. Individual attributes are set using the setAttribute() function. The
- \l{QWebEngineSettings::WebAttribute}{WebAttribute} enum further describes each attribute.
-
- Each QWebEnginePage object has its own QWebEngineSettings object, which configures the
- settings for that page. If a setting is not configured for a web engine
- page, it is looked up in the settings of the profile the page belongs to.
-
- \sa QWebEnginePage::settings(), QWebEngineView::settings()
-*/
-
-/*!
- \enum QWebEngineSettings::FontFamily
-
- This enum describes the generic font families defined by CSS 2.
- For more information see the
- \l{http://www.w3.org/TR/REC-CSS2/fonts.html#generic-font-families}{CSS standard}.
-
- \value StandardFont
- \value FixedFont
- \value SerifFont
- \value SansSerifFont
- \value CursiveFont
- \value FantasyFont
- \value PictographFont
- (added in Qt 5.7)
-*/
-
-/*!
- \enum QWebEngineSettings::FontSize
-
- This enum describes the font sizes configurable through QWebEngineSettings:
-
- \value MinimumFontSize The hard minimum font size.
- \value MinimumLogicalFontSize The minimum logical font size that is applied
- when zooming out.
- \value DefaultFontSize The default font size for regular text.
- \value DefaultFixedFontSize The default font size for fixed-pitch text.
-*/
-
-/*!
- \enum QWebEngineSettings::WebAttribute
-
- This enum type specifies settings for web pages:
-
- \value AutoLoadImages
- Automatically dowloads images for web pages. When this setting is
- disabled, images are loaded from the cache. Enabled by default.
- \value JavascriptEnabled
- Enables the running of JavaScript programs in the
- \l{QWebEngineScript::MainWorld}{MainWorld}. Enabled by default.
- \value JavascriptCanOpenWindows
- Allows JavaScript programs to open popup windows without user
- interaction. Enabled by default.
- \value JavascriptCanAccessClipboard
- Allows JavaScript programs to read from and write to the clipboard.
- Writing to the clipboard is always allowed if it is specifically requested by the user.
- See JavascriptCanPaste to also allow pasting the content of the clipboard content from
- JavaScript.
- Disabled by default.
- \value LinksIncludedInFocusChain
- Includes hyperlinks in the keyboard focus chain. Enabled by default.
- \value LocalStorageEnabled
- Enables support for the HTML 5 local storage feature. Enabled by default.
- \value LocalContentCanAccessRemoteUrls
- Allows locally loaded documents to ignore cross-origin rules so that they can access
- remote resources that would normally be blocked, because all remote resources are
- considered cross-origin for a local file. Remote access that would not be blocked by
- cross-origin rules is still possible when this setting is disabled (default).
- Note that disabling this setting does not stop XMLHttpRequests or media elements in
- local files from accessing remote content. Basically, it only stops some HTML
- subresources, such as scripts, and therefore disabling this setting is not a safety
- mechanism.
- \value XSSAuditingEnabled
- Obsolete and has no effect.
- \value SpatialNavigationEnabled
- Enables the Spatial Navigation feature, which means the ability to navigate between
- focusable elements, such as hyperlinks and form controls, on a web page by using the
- Left, Right, Up and Down arrow keys. For example, if a user presses the
- Right key, heuristics determine whether there is an element they might be
- trying to reach towards the right and which element they probably want.
- Disabled by default.
- \value LocalContentCanAccessFileUrls
- Allows locally loaded documents to access other local URLs. Enabled by default.
- \value HyperlinkAuditingEnabled
- Enables support for the \c ping attribute for hyperlinks. Disabled by default.
- \value ScrollAnimatorEnabled
- Enables animated scrolling. Disabled by default.
- \value ErrorPageEnabled
- Enables displaying the built-in error pages of Chromium. Enabled by default.
- \value PluginsEnabled
- Enables support for Pepper plugins, such as the Flash player. Disabled by default.
- See also \l{Pepper Plugin API}. (Added in Qt 5.6)
- \value FullScreenSupportEnabled
- Enables fullscreen support in an application. Disabled by default. (Added in Qt 5.6)
- \value ScreenCaptureEnabled
- Enables screen capture in an application. Disabled by default. (Added in Qt 5.7)
- \value WebGLEnabled
- Enables support for HTML 5 WebGL. Enabled by default if available. (Added in Qt 5.7)
- \value Accelerated2dCanvasEnabled
- Specifies whether the HTML5 2D canvas should be a OpenGL framebuffer.
- This makes many painting operations faster, but slows down pixel access. Enabled by default if available. (Added in Qt 5.7)
- \value AutoLoadIconsForPage
- Automatically downloads icons for web pages. Enabled by default. (Added in Qt 5.7)
- \value TouchIconsEnabled
- Enables support for touch icons and precomposed touch icons
- Disabled by default. (Added in Qt 5.7)
- \value FocusOnNavigationEnabled
- Gives focus to the view associated with the page, whenever a navigation operation occurs
- (load, stop, reload, reload and bypass cache, forward, backward, set content, and so
- on).
- Disabled by default. (Added in Qt 5.8)
- \value PrintElementBackgrounds
- Turns on printing of CSS backgrounds when printing a web page.
- Enabled by default. (Added in Qt 5.8)
- \value AllowRunningInsecureContent
- By default, HTTPS pages cannot run JavaScript, CSS, plugins or
- web-sockets from HTTP URLs. This provides an override to get
- the old insecure behavior.
- Disabled by default. (Added in Qt 5.8)
- \value AllowGeolocationOnInsecureOrigins
- Since Qt 5.7, only secure origins such as HTTPS have been able to request
- Geolocation features. This provides an override to allow non secure
- origins to access Geolocation again.
- Disabled by default. (Added in Qt 5.9)
- \value AllowWindowActivationFromJavaScript
- Allows activating windows by using the window.focus() JavaScript
- method. Disabled by default.
- (Added in Qt 5.10)
- \value ShowScrollBars
- Shows scroll bars.
- Enabled by default. (Added in Qt 5.10)
- \value PlaybackRequiresUserGesture
- Inhibits playback of media content until the user interacts with
- the page. By default, WebEngine uses Chromium settings, as described
- in \l {Autoplay Policy Changes}. This is similar to how Chrome on
- Android behaves, while the default behavior when it is disabled is
- similar to Chrome on desktops. To overwrite the default behavior,
- disable this setting. (Added in Qt 5.11)
- \value JavascriptCanPaste
- Enables JavaScript \c{execCommand("paste")}. This also requires
- enabling JavascriptCanAccessClipboard.
- Disabled by default. (Added in Qt 5.11)
- \value WebRTCPublicInterfacesOnly
- Limits WebRTC to public IP addresses only. When disabled WebRTC may also use
- local network IP addresses, but remote hosts can also see your local network
- IP address.
- Disabled by default. (Added in Qt 5.11)
- \value DnsPrefetchEnabled Specifies whether WebEngine will try to pre-fetch DNS entries to
- speed up browsing.
- Disabled by default. (Added in Qt 5.12)
- \value PdfViewerEnabled Specifies that PDF documents will be opened in the internal PDF viewer
- instead of being downloaded.
- Enabled by default. (Added in Qt 5.13)
-*/
-
-/*!
- \enum QWebEngineSettings::UnknownUrlSchemePolicy
- \since Qt 5.11
-
- This enum describes how navigation requests to URLs with unknown schemes are handled.
-
- \value DisallowUnknownUrlSchemes
- Disallows all navigation requests to URLs with unknown schemes.
- \value AllowUnknownUrlSchemesFromUserInteraction
- Allows navigation requests to URLs with unknown schemes that are issued from
- user-interaction (like a mouse-click), whereas other navigation requests (for example
- from JavaScript) are suppressed.
- \value AllowAllUnknownUrlSchemes
- Allows all navigation requests to URLs with unknown schemes.
-
- \sa unknownUrlSchemePolicy setUnknownUrlSchemePolicy resetUnknownUrlSchemePolicy
-*/
-
-/*!
- \fn void QWebEngineSettings::setFontSize(FontSize type, int size)
- Sets the font size for \a type to \a size in pixels.
-*/
-
-/*!
- \fn int QWebEngineSettings::fontSize(FontSize type) const
- Returns the default font size for \a type in pixels.
-*/
-
-/*!
- \fn void QWebEngineSettings::resetFontSize(FontSize type)
- Resets the font size for \a type to the size specified in the profile that
- the page belongs to.
-*/
-
-/*!
- \fn void QWebEngineSettings::setDefaultTextEncoding(const QString& encoding)
- Specifies the default text encoding system.
-
- The value of \a encoding must be a string describing an encoding such as "utf-8" or
- "iso-8859-1". If left empty, a default value will be used. For a more
- extensive list of encoding names see \l{QTextCodec}.
-
- \sa defaultTextEncoding()
-*/
-
-/*!
- \fn QString QWebEngineSettings::defaultTextEncoding() const
- Returns the default text encoding.
-
- \sa setDefaultTextEncoding()
-*/
-
-/*!
- \fn void QWebEngineSettings::setFontFamily(FontFamily which, const QString& family)
- Sets the actual font family to \a family for the specified generic family,
- \a which.
-*/
-
-/*!
- \fn QString QWebEngineSettings::fontFamily(FontFamily which) const
- Returns the actual font family for the specified generic font family,
- \a which.
-*/
-
-/*!
- \fn void QWebEngineSettings::resetFontFamily(FontFamily which)
- Resets the actual font family specified by \a which to the one specified
- in the profile that the page belongs to.
-*/
-
-/*!
- \fn QWebEngineSettings::UnknownUrlSchemePolicy QWebEngineSettings::unknownUrlSchemePolicy() const
- \since Qt 5.11
- Returns the currently selected policy for handling navigation requests to URLs with
- unknown schemes. Default is \l{QWebEngineSettings::AllowUnknownUrlSchemesFromUserInteraction}.
- \sa setUnknownUrlSchemePolicy resetUnknownUrlSchemePolicy
-*/
-
-/*!
- \fn void QWebEngineSettings::setUnknownUrlSchemePolicy(QWebEngineSettings::UnknownUrlSchemePolicy policy)
- \since Qt 5.11
- Sets the policy for handling navigation requests to URLs with unknown schemes to \a policy.
- Default is \l{QWebEngineSettings::AllowUnknownUrlSchemesFromUserInteraction}.
- \sa unknownUrlSchemePolicy resetUnknownUrlSchemePolicy
-*/
-
-/*!
- \fn void QWebEngineSettings::resetUnknownUrlSchemePolicy()
- \since Qt 5.11
- Removes the policy for handling navigation requests to URLs with unknown schemes.
- \sa unknownUrlSchemePolicy setUnknownUrlSchemePolicy
-*/
-
-/*!
- \fn void QWebEngineSettings::setAttribute(WebAttribute attribute, bool on)
-
- Enables or disables the specified \a attribute feature depending on the
- value of \a on.
-*/
-
-/*!
- \fn bool QWebEngineSettings::testAttribute(WebAttribute attribute) const
-
- Returns \c true if \a attribute is enabled; otherwise returns \c false.
-*/
-
-/*!
- \fn void QWebEngineSettings::resetAttribute(WebAttribute attribute)
-
- Resets the setting of \a attribute to the value specified in the
- profile that the page belongs to.
-*/
diff --git a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
index 3f1b6e509..3153ec952 100644
--- a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
@@ -1,24 +1,8 @@
-/*
- Copyright (C) 2019 The Qt Company Ltd.
- Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
- Copyright (C) 2008 Holger Hans Peter Freyther
- Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
+// Copyright (C) 2019 The Qt Company Ltd.
+// Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+// Copyright (C) 2008 Holger Hans Peter Freyther
+// Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
// The documentation in this file was imported from QtWebKit and is thus constrained
// by its LGPL license. Documentation written from scratch for new methods should be
@@ -77,7 +61,7 @@
new windows, such as pop-up windows, you can subclass QWebEngineView and
reimplement the createWindow() function.
- \sa {WebEngine Widgets Simple Browser Example}, {WebEngine Content Manipulation Example}, {WebEngine Markdown Editor Example}
+ \sa {WebEngine Widgets Simple Browser Example}, {WebEngine Content Manipulation Example}
*/
@@ -124,9 +108,8 @@
\fn void QWebEngineView::setHtml(const QString &html, const QUrl &baseUrl)
Sets the content of the web view to the specified \a html content.
- External objects, such as stylesheets or images referenced in the HTML
- document, are located relative to \a baseUrl. For external objects to
- be loaded, \c baseUrl cannot be empty. For example, if \a html
+ \a baseUrl is optional and used to resolve relative URLs in the document,
+ such as referenced images or stylesheets. For example, if \a html
is retrieved from \c http://www.example.com/documents/overview.html, which
is the base URL, then an image referenced with the relative URL, \c diagram.png,
should be at \c{http://www.example.com/documents/diagram.png}.
@@ -160,7 +143,7 @@
is empty, it is assumed that the content is \c{text/plain,charset=US-ASCII}.
External objects referenced in the content are located relative to \a baseUrl.
- For external objects to be loaded, \c baseUrl cannot be empty.
+ For external objects with relative URLs to be loaded, \c baseUrl cannot be empty.
The data is loaded immediately; external objects are loaded asynchronously.
@@ -226,6 +209,7 @@
/*!
\fn QAction *QWebEngineView::pageAction(QWebEnginePage::WebAction action) const
Returns a pointer to a QAction that encapsulates the specified web action \a action.
+ This function will also set a default styled icon to the QAction if it lacks one.
*/
/*!
@@ -249,13 +233,12 @@
*/
/*!
- \fn void QWebEngineView::findText(const QString &subString, QWebEnginePage::FindFlags options = QWebEnginePage::FindFlags(), const QWebEngineCallback<bool> &resultCallback = QWebEngineCallback<bool>())
+ \fn void QWebEngineView::findText(const QString &subString, QWebEnginePage::FindFlags options = {}, const std::function<void(const QWebEngineFindTextResult &)> &resultCallback = std::function<void(const QWebEngineFindTextResult &)>)
Finds the specified string, \a subString, in the page, using the given \a options.
To clear the selection, just pass an empty string.
- \a resultCallback must take a boolean parameter. It will be called with a value of \c true
- if \a subString was found; otherwise the callback value will be \c false.
+ The \a resultCallback must take a QWebEngineFindTextResult parameter.
\warning We guarantee that the callback (\a resultCallback) is always called, but it might be done
during page destruction. When QWebEnginePage is deleted, the callback is triggered with an invalid
@@ -392,6 +375,4 @@
It is equivalent to:
\snippet qtwebengine_qwebengineview_snippet.cpp 6
-
- \sa QWebEngineSettings::defaultSettings()
*/