QWebEnginePage Class The QWebEnginePage class provides an object to view and edit web documents. More...  
 Header:
 #include <QWebEnginePage> 


 qmake:
 QT += webenginewidgets


 Since:
 Qt 5.4


 Inherits:
 QObject



 List of all members, including inherited members  Public Types  
 enum 

Feature { Geolocation, MediaAudioCapture, MediaVideoCapture, MediaAudioVideoCapture, MouseLock }
 
 enum 

FileSelectionMode { FileSelectOpen, FileSelectOpenMultiple }
 
 enum 

FindFlag { FindBackward, FindCaseSensitively }
 
 flags 
FindFlags
 
 enum 

JavaScriptConsoleMessageLevel { InfoMessageLevel, WarningMessageLevel, ErrorMessageLevel }
 
 enum 

NavigationType { NavigationTypeLinkClicked, NavigationTypeTyped, NavigationTypeFormSubmitted, NavigationTypeBackForward, NavigationTypeReload, NavigationTypeOther }
 
 enum 

PermissionPolicy { PermissionUnknown, PermissionGrantedByUser, PermissionDeniedByUser }
 
 enum 

RenderProcessTerminationStatus { NormalTerminationStatus, AbnormalTerminationStatus, CrashedTerminationStatus, KilledTerminationStatus }
 
 enum 

WebAction { NoWebAction, Back, Forward, Stop, ..., ViewSource }
 
 enum 

WebWindowType { WebBrowserWindow, WebBrowserTab, WebDialog, WebBrowserBackgroundTab }
  Properties  
 
audioMuted : bool 
backgroundColor : QColor 
contentsSize : const QSizeF 
hasSelection : const bool 
icon : const QIcon 
iconUrl : const QUrl 
recentlyAudible : const bool 

 
requestedUrl : const QUrl 
scrollPosition : const QPointF 
selectedText : const QString 
title : const QString 
url : QUrl 
zoomFactor : qreal  
   1 property inherited from QObject
  Public Functions  
 

QWebEnginePage(QObject *parent = Q_NULLPTR)
 
 

QWebEnginePage(QWebEngineProfile *profile, QObject *parent = Q_NULLPTR)
 
 

~QWebEnginePage()
 
 QAction *

action(WebAction action) const
 
 QColor 

backgroundColor() const
 
 QSizeF 

contentsSize() const
 
 const QWebEngineContextMenuData &

contextMenuData() const
 
 QMenu *

createStandardContextMenu()
 
 void 

findText(const QString &subString, FindFlags options = FindFlags())
 
 void 

findText(const QString &subString, FindFlags options, FunctorOrLambda resultCallback)
 
 bool 

hasSelection() const
 
 QWebEngineHistory *

history() const
 
 QIcon 

icon() const
 
 QUrl 

iconUrl() const
 
 bool 

isAudioMuted() const
 
 void 

load(const QUrl &url)
 
 void 

load(const QWebEngineHttpRequest &request)
 
 void 

print(QPrinter *printer, FunctorOrLambda resultCallback)
 
 void 

printToPdf(const QString &filePath, const QPageLayout &pageLayout = QPageLayout( QPageSize( QPageSiz8b7c:f320:99b9:690f:4595:cd17:293a:c069A4 ), QPageLayout8b7c:f320:99b9:690f:4595:cd17:293a:c069Portrait, QMarginsF() ))
 
 void 

printToPdf(FunctorOrLambda resultCallback, const QPageLayout &pageLayout = QPageLayout( QPageSize( QPageSiz8b7c:f320:99b9:690f:4595:cd17:293a:c069A4 ), QPageLayout8b7c:f320:99b9:690f:4595:cd17:293a:c069Portrait, QMarginsF() ))
 
 QWebEngineProfile *

profile() const
 
 bool 

recentlyAudible() const
 
 void 

replaceMisspelledWord(const QString &replacement)
 
 QUrl 

requestedUrl() const
 
 void 

runJavaScript(const QString &scriptSource, quint32 worldId, FunctorOrLambda resultCallback)
 
 void 

runJavaScript(const QString &scriptSource, quint32 worldId)
 
 void 

runJavaScript(const QString &scriptSource, FunctorOrLambda resultCallback)
 
 void 

runJavaScript(const QString &scriptSource)
 
 void 

save(const QString &filePath, QWebEngineDownloadItem8b7c:f320:99b9:690f:4595:cd17:293a:c069SavePageFormat format = QWebEngineDownloadItem8b7c:f320:99b9:690f:4595:cd17:293a:c069MimeHtmlSaveFormat) const
 
 QWebEngineScriptCollection &

scripts()
 
 QPointF 

scrollPosition() const
 
 QString 

selectedText() const
 
 void 

setAudioMuted(bool muted)
 
 void 

setBackgroundColor(const QColor &color)
 
 void 

setContent(const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl())
 
 void 

setFeaturePermission(const QUrl &securityOrigin, Feature feature, PermissionPolicy policy)
 
 void 

setHtml(const QString &html, const QUrl &baseUrl = QUrl())
 
 void 

setUrl(const QUrl &url)
 
 void 

setView(QWidget *view)
 
 void 

setWebChannel(QWebChannel *channel, uint worldId)
 
 void 

setWebChannel(QWebChannel *channel)
 
 void 

setZoomFactor(qreal factor)
 
 QWebEngineSettings *

settings() const
 
 QString 

title() const
 
 void 

toHtml(FunctorOrLambda resultCallback) const
 
 void 

toPlainText(FunctorOrLambda resultCallback) const
 
 virtual void 

triggerAction(WebAction action, bool checked = false)
 
 QUrl 

url() const
 
 QWidget *

view() const
 
 QWebChannel *

webChannel() const
 
 qreal 

zoomFactor() const
  Reimplemented Public Functions  
 virtual bool 

event(QEvent *e)
   32 public functions inherited from QObject
  Signals  
 void 

audioMutedChanged(bool muted)
 
 void 

authenticationRequired(const QUrl &requestUrl, QAuthenticator *authenticator)
 
 void 

contentsSizeChanged(const QSizeF &size)
 
 void 

featurePermissionRequestCanceled(const QUrl &securityOrigin, QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Feature feature)
 
 void 

featurePermissionRequested(const QUrl &securityOrigin, QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Feature feature)
 
 void 

fullScreenRequested(QWebEngineFullScreenRequest request)
 
 void 

geometryChangeRequested(const QRect &geom)
 
 void 

iconChanged(const QIcon &icon)
 
 void 

iconUrlChanged(const QUrl &url)
 
 void 

linkHovered(const QString &url)
 
 void 

loadFinished(bool ok)
 
 void 

loadProgress(int progress)
 
 void 

loadStarted()
 
 void 

pdfPrintingFinished(const QString &filePath, bool success)
 
 void 

proxyAuthenticationRequired(const QUrl &requestUrl, QAuthenticator *authenticator, const QString &proxyHost)
 
 void 

recentlyAudibleChanged(bool recentlyAudible)
 
 void 

renderProcessTerminated(RenderProcessTerminationStatus terminationStatus, int exitCode)
 
 void 

scrollPositionChanged(const QPointF &position)
 
 void 

selectionChanged()
 
 void 

titleChanged(const QString &title)
 
 void 

urlChanged(const QUrl &url)
 
 void 

windowCloseRequested()
   2 signals inherited from QObject
  Protected Functions  
 virtual bool 

acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame)
 
 virtual bool 

certificateError(const QWebEngineCertificateError &certificateError)
 
 virtual QStringList 

chooseFiles(FileSelectionMode mode, const QStringList &oldFiles, const QStringList &acceptedMimeTypes)
 
 virtual QWebEnginePage *

createWindow(WebWindowType type)
 
 virtual void 

javaScriptAlert(const QUrl &securityOrigin, const QString &msg)
 
 virtual bool 

javaScriptConfirm(const QUrl &securityOrigin, const QString &msg)
 
 virtual void 

javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID)
 
 virtual bool 

javaScriptPrompt(const QUrl &securityOrigin, const QString &msg, const QString &defaultValue, QString *result)
   9 protected functions inherited from QObject
  Additional Inherited Members  1 public slot inherited from QObject
 11 static public members inherited from QObject
  Detailed Description The QWebEnginePage class provides an object to view and edit web documents. A 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 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 (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 true or false, indicates whether or not the load operation succeeded. An HTML document is loaded in a main frame within the web page. If it references child frames (as defined by the <frame> or <iframe> elements), they are considered part of the content. Child frames are individually accessible only through JavaScript. Web sites define 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 http://www.example.com/my/page.html and 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, http://www.malicious.com/evil.html is prevented from accessing the resources of http://www.example.com/, because they are of a different security origin. By default, local schemes like file:// and 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 file:// will not be able to access http://domain.com/foo.html. Scripts can be executed on the web page by using runJavaScript(), either in the main JavaScript 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. QWebEngineScript8b7c:f320:99b9:690f:4595:cd17:293a:c069ScriptWorldId provides some predefined IDs for this purpose. Using the runJavaScript() version without the world ID is the same as running the script in the MainWorld. The FocusOnNavigationEnabled setting can be used to stop the view associated with the page from automatically receiving focus when a navigation operation occurs (like loading or reloading a page or navigating through history). Member Type Documentation 
enum QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Feature
 This enum describes the platform feature access categories that the user may be asked to grant or deny access to: 

Constant
Value
Description
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Geolocation
1
Location hardware or service.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069MediaAudioCapture
2
Audio capture devices, such as microphones.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069MediaVideoCapture
3
Video devices, such as cameras.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069MediaAudioVideoCapture
4
Both audio and video capture devices.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069MouseLock
5
Mouse locking, which locks the mouse pointer to the web view and is typically used in games.
  See also featurePermissionRequested(), featurePermissionRequestCanceled(), setFeaturePermission(), and PermissionPolicy. 
enum QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069FileSelectionMode
 This enum indicates whether the implementation of the chooseFiles() function should return only one file or may return multiple files: 

Constant
Value
Description
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069FileSelectOpen
0
Return only one file name.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069FileSelectOpenMultiple
1
Return multiple file names.
  See also chooseFiles(). 
enum QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069FindFlagflags QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069FindFlags
 This enum describes the options available to the findText() function. The options can be OR-ed together from the following list: 

Constant
Value
Description
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069FindBackward
1
Searches backwards instead of forwards.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069FindCaseSensitively
2
By default findText() works case insensitive. Specifying this option changes the behavior to a case sensitive find operation.
  The FindFlags type is a typedef for QFlags<FindFlag>. It stores an OR combination of FindFlag values. 
enum QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069JavaScriptConsoleMessageLevel
 This enum describes the different severity levels a JavaScript console message can have: 

Constant
Value
Description
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069InfoMessageLevel
0
The message is purely informative and can safely be ignored.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069WarningMessageLevel
1
The message informs about unexpected behavior or errors that may need attention.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069ErrorMessageLevel
2
The message indicates there has been an error.
  
enum QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069NavigationType
 This enum describes the type of a navigation request: 

Constant
Value
Description
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069NavigationTypeLinkClicked
0
The navigation request resulted from a clicked link.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069NavigationTypeTyped
1
The navigation request resulted from an explicitly loaded URL.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069NavigationTypeFormSubmitted
2
The navigation request resulted from a form submission.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069NavigationTypeBackForward
3
The navigation request resulted from a back or forward action.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069NavigationTypeReload
4
The navigation request resulted from a reload action.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069NavigationTypeOther
5
The navigation request was triggered by other means not covered by the above.
  See also acceptNavigationRequest(). 
enum QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069PermissionPolicy
 This enum describes the permission policies that the user may set for data or device access: 

Constant
Value
Description
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069PermissionUnknown
0
It is unknown whether the user grants or denies permission.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069PermissionGrantedByUser
1
The user has granted permission.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069PermissionDeniedByUser
2
The user has denied permission.
  See also featurePermissionRequested(), featurePermissionRequestCanceled(), setFeaturePermission(), and Feature. 
enum QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069RenderProcessTerminationStatus
 This enum describes the status with which the render process terminated: 

Constant
Value
Description
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069NormalTerminationStatus
0
The render process terminated normally.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069AbnormalTerminationStatus
1
The render process terminated with with a non-zero exit status.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069CrashedTerminationStatus
2
The render process crashed, for example because of a segmentation fault.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069KilledTerminationStatus
3
The render process was killed, for example by SIGKILL or task manager kill.
  This enum was introduced or modified in Qt 5.6. 
enum QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069WebAction
 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 isEnabled() on the action returned by action(). 

Constant
Value
Description
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069NoWebAction
-1
No action is triggered.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Back
0
Navigate back in the history of navigated links.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Forward
1
Navigate forward in the history of navigated links.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Stop
2
Stop loading the current page.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Reload
3
Reload the current page.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069ReloadAndBypassCache
10
Reload the current page, but do not use any local cache.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Cut
4
Cut the content currently selected into the clipboard.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Copy
5
Copy the content currently selected into the clipboard.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Paste
6
Paste content from the clipboard.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Undo
7
Undo the last editing action.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Redo
8
Redo the last editing action.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069SelectAll
9
Select all content.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069PasteAndMatchStyle
11
Paste content from the clipboard with current style.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069OpenLinkInThisWindow
12
Open the current link in the current window. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069OpenLinkInNewWindow
13
Open the current link in a new window. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069OpenLinkInNewTab
14
Open the current link in a new tab. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069OpenLinkInNewBackgroundTab
31
Open the current link in a new background tab. (Added in Qt 5.7)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069CopyLinkToClipboard
15
Copy the current link to the clipboard. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069CopyImageToClipboard
17
Copy the clicked image to the clipboard. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069CopyImageUrlToClipboard
18
Copy the clicked image's URL to the clipboard. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069CopyMediaUrlToClipboard
20
Copy the hovered audio or video's URL to the clipboard. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069ToggleMediaControls
21
Toggle between showing and hiding the controls for the hovered audio or video element. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069ToggleMediaLoop
22
Toggle whether the hovered audio or video should loop on completetion or not. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069ToggleMediaPlayPause
23
Toggle the play/pause state of the hovered audio or video element. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069ToggleMediaMute
24
Mute or unmute the hovered audio or video element. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069DownloadLinkToDisk
16
Download the current link to the disk. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069DownloadImageToDisk
19
Download the highlighted image to the disk. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069DownloadMediaToDisk
25
Download the hovered audio or video to the disk. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069InspectElement
26
Trigger any attached Web Inspector to inspect the highlighed element. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069ExitFullScreen
27
Exit the fullscreen mode. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069RequestClose
28
Request to close the web page. If defined, the window.onbeforeunload handler is run, and the user can confirm or reject to close the page. If the close request is confirmed, windowCloseRequested is emitted. (Added in Qt 5.6)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Unselect
29
Clear the current selection. (Added in Qt 5.7)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069SavePage
30
Save the current page to disk. MHTML is the default format that is used to store the web page on disk. (Added in Qt 5.7)
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069ViewSource
32
Show the source of the current page in a new tab. (Added in Qt 5.8)
  
enum QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069WebWindowType
 This enum describes the types of window that can be created by the createWindow() function: 

Constant
Value
Description
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069WebBrowserWindow
0
A complete web browser window.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069WebBrowserTab
1
A web browser tab.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069WebDialog
2
A window without decoration.
 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069WebBrowserBackgroundTab
3
A web browser tab without hiding the current visible WebEngineView. (Added in Qt 5.7)
   Property Documentation 
audioMuted : bool
 This property holds whether the current page audio is muted. The default value is false. This property was introduced in Qt 5.7. Access functions:  
 bool 

isAudioMuted() const
 
 void 

setAudioMuted(bool muted)
  Notifier signal:  
 void 

audioMutedChanged(bool muted)
  See also recentlyAudible. 
backgroundColor : QColor
 This property holds the page's background color behind the document's body. You can set the background color to Qt8b7c:f320:99b9:690f:4595:cd17:293a:c069transparent or to a translucent color to see through the document, or you can set it to match your web content in a hybrid application to prevent the white flashes that may appear during loading. The default value is white. This property was introduced in Qt 5.6. Access functions:  
 QColor 

backgroundColor() const
 
 void 

setBackgroundColor(const QColor &color)
  
contentsSize : const QSizeF
 The size of the page contents. This property was introduced in Qt 5.7. Access functions:  
 QSizeF 

contentsSize() const
  Notifier signal:  
 void 

contentsSizeChanged(const QSizeF &size)
  
hasSelection : const bool
 This property holds whether this page contains selected content or not. Access functions:  
 bool 

hasSelection() const
  See also selectionChanged(). 
icon : const QIcon
 This property holds the icon associated with the page currently viewed By default, this property contains a null icon. If the web page specifies more than one icon, the icon property encapsulates the available candidate icons in a single, scalable QIcon. This property was introduced in Qt 5.7. Access functions:  
 QIcon 

icon() const
  Notifier signal:  
 void 

iconChanged(const QIcon &icon)
  See also iconChanged(), iconUrl(), and iconUrlChanged(). 
iconUrl : const QUrl
 This property holds the URL of the icon associated with the page currently viewed By default, this property contains an empty URL. Access functions:  
 QUrl 

iconUrl() const
  Notifier signal:  
 void 

iconUrlChanged(const QUrl &url)
  See also iconUrlChanged(), icon(), and iconChanged(). 
recentlyAudible : const bool
 This property holds the current page's audible state, that is, whether audio was recently played or not. The default value is false. This property was introduced in Qt 5.7. Access functions:  
 bool 

recentlyAudible() const
  Notifier signal:  
 void 

recentlyAudibleChanged(bool recentlyAudible)
  See also audioMuted. 
requestedUrl : const QUrl
 This property holds 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.
Access functions:  
 QUrl 

requestedUrl() const
  See also url() and setUrl(). 
scrollPosition : const QPointF
 This property holds the scroll position of the page contents. This property was introduced in Qt 5.7. Access functions:  
 QPointF 

scrollPosition() const
  Notifier signal:  
 void 

scrollPositionChanged(const QPointF &position)
  
selectedText : const QString
 This property holds the text currently selected By default, this property contains an empty string. Access functions:  
 QString 

selectedText() const
  See also selectionChanged(). 
title : const QString
 This property holds the title of the page as defined by the HTML <title> element Access functions:  
 QString 

title() const
  See also titleChanged(). 
url : QUrl
 This property holds 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. Access functions:  
 QUrl 

url() const
 
 void 

setUrl(const QUrl &url)
  See also urlChanged(). 
zoomFactor : qreal
 This property holds the zoom factor for the page content Valid values are within the range from 0.25 to 5.0. The default factor is 1.0. Access functions:  
 qreal 

zoomFactor() const
 
 void 

setZoomFactor(qreal factor)
   Member Function Documentation 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069QWebEnginePage(QObject *parent = Q_NULLPTR) Constructs an empty QWebEnginePage with the parent parent. 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069QWebEnginePage(QWebEngineProfile *profile, QObject *parent = Q_NULLPTR) Constructs an empty web engine page in the web engine profile profile with the parent parent. If the profile is not the default profile, the caller must ensure that the profile stays alive for as long as the page does. This function was introduced in Qt 5.5. 
QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069~QWebEnginePage() Destroys the web page. 
[virtual protected] bool QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame) This function is called upon receiving a request to navigate to the specified url by means of the specified navigation type type. isMainFrame indicates whether the request corresponds to the main frame or a child frame. If the function returns true, the navigation request is accepted and url is loaded. The default implementation accepts all navigation requests. This function is called for absolute URLs that are prefixed with http:// or https:// and for unrecognized schemes, such as 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 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. The QWebEngineUrlRequestInterceptor class offers further options for intercepting and manipulating requests. This function was introduced in Qt 5.5. 
QAction *QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069action(WebAction action) const Returns a QAction for the specified WebAction 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. See also triggerAction(). 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069audioMutedChanged(bool muted) This signal is emitted when the page's muted state changes. Note: Not to be confused with a specific HTML5 audio or video element being muted.
This function was introduced in Qt 5.7. Note: Notifier signal for property audioMuted.  
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069authenticationRequired(const QUrl &requestUrl, QAuthenticator *authenticator) This signal is emitted when access to requestUrl requires authentication. authenticator should be used to pass the user name and password for the connection. 
[virtual protected] bool QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069certificateError(const QWebEngineCertificateError &certificateError) This function is called when an invalid certificate error is raised while loading a given request. The certificateError parameter contains information about the certificate and details of the error. Return true to ignore the error and complete the request. Return false to stop loading the request. See also QWebEngineCertificateError. 
[virtual protected] QStringList QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069chooseFiles(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. 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 oldFiles. acceptedMimeTypes is ignored by the default implementation, but might be used by overrides. 
const QWebEngineContextMenuData &QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069contextMenuData() const Returns additional data about the current context menu. It is only guaranteed to be valid during the call to the QWebEngineView8b7c:f320:99b9:690f:4595:cd17:293a:c069ontextMenuEvent() handler of the associated QWebEngineView. This function was introduced in Qt 5.7. See also createStandardContextMenu(). 
QMenu *QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069createStandardContextMenu() 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 contextMenuEvent() handler. The popup menu's ownership is transferred to the caller. Returns nullptr if the context menu data is not initialized, for example when it is called when there is actually no context menu requested. 
[virtual protected] QWebEnginePage *QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069createWindow(WebWindowType type) This function is called to create a new window of the specified 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 QWebEngineView8b7c:f320:99b9:690f:4595:cd17:293a:c069reateWindow(); 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 QWebEngineSettings8b7c:f320:99b9:690f:4595:cd17:293a:c069JavascriptCanOpenWindows to true in order for the method to get called.
See also QWebEngineView8b7c:f320:99b9:690f:4595:cd17:293a:c069reateWindow(). 
[virtual] bool QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069event(QEvent *e) Reimplemented from QObject8b7c:f320:99b9:690f:4595:cd17:293a:c069vent(). 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069featurePermissionRequestCanceled(const QUrl &securityOrigin, QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Feature feature) This signal is emitted when the web site identified by securityOrigin cancels a previously issued request to make use of feature. See also featurePermissionRequested() and setFeaturePermission(). 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069featurePermissionRequested(const QUrl &securityOrigin, QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069Feature feature) This signal is emitted when the web site identified by securityOrigin requests to make use of the resource or device identified by feature. See also featurePermissionRequestCanceled() and setFeaturePermission(). 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069findText(const QString &subString, FindFlags options = FindFlags()) Finds the specified string, subString, in the page, using the given options. To clear the search highlight, just pass an empty string. 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069findText(const QString &subString, FindFlags options, FunctorOrLambda resultCallback) Finds the specified string, subString, in the page, using the given options. To clear the search highlight, just pass an empty string. The resultCallback must take a boolean parameter. It will be called with a value of true if the subString was found; otherwise the callback value will be false. For example:     m_view->page()->findText(QStringLiteral("Qt"), QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069FindFlags(), [this](bool found) {
        if (!found) QMessageBox8b7c:f320:99b9:690f:4595:cd17:293a:c069information(m_view, QString(), QStringLiteral("No occurrences found"));
    }); 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069fullScreenRequested(QWebEngineFullScreenRequest request) This signal is emitted when the web page issues the request to enter fullscreen mode for a web-element, usually a video element. The request object request can be used to accept or reject the request. If the request is accepted the element requesting fullscreen will fill the viewport, but it is up to the application to make the view fullscreen or move the page to a view that is fullscreen. See also QWebEngineSettings8b7c:f320:99b9:690f:4595:cd17:293a:c069ullScreenSupportEnabled. 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069geometryChangeRequested(const QRect &geom) This signal is emitted whenever the document wants to change the position and size of the page to geom. This can happen for example through JavaScript. 
QWebEngineHistory *QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069history() const Returns a pointer to the view's history of navigated web pages. 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069iconChanged(const QIcon &icon) This signal is emitted when the icon ("favicon") associated with the page is changed. The new icon is specified by icon. This function was introduced in Qt 5.7. Note: Notifier signal for property icon. 
See also icon(), iconUrl(), and iconUrlChanged(). 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069iconUrlChanged(const QUrl &url) This signal is emitted when the URL of the icon ("favicon") associated with the page is changed. The new URL is specified by url. Note: Notifier signal for property iconUrl. 
See also iconUrl(), icon(), and iconChanged(). 
[virtual protected] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069javaScriptAlert(const QUrl &securityOrigin, const QString &msg) This function is called whenever a JavaScript program running in a frame affiliated with securityOrigin calls the alert() function with the message msg. The default implementation shows the message, msg, with QMessageBox8b7c:f320:99b9:690f:4595:cd17:293a:c069information. 
[virtual protected] bool QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069javaScriptConfirm(const QUrl &securityOrigin, const QString &msg) This function is called whenever a JavaScript program running in a frame affiliated with securityOrigin calls the confirm() function with the message msg. Returns true if the user confirms the message; otherwise returns false. It is also called when the onbeforeunload handler is requesting a confirmation before leaving a page. The default implementation executes the query using QMessageBox8b7c:f320:99b9:690f:4595:cd17:293a:c069information with QMessageBox8b7c:f320:99b9:690f:4595:cd17:293a:c069Ok and QMessageBox8b7c:f320:99b9:690f:4595:cd17:293a:c069ncel buttons. 
[virtual protected] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID) This function is called when a JavaScript program tries to print the message to the web browser's console. For example, in case of evaluation errors the source URL may be provided in sourceID as well as the lineNumber. 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 js logging category. See also Console Logging. 
[virtual protected] bool QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069javaScriptPrompt(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 securityOrigin tries to prompt the user for input. The program may provide an optional message, msg, as well as a default value for the input in defaultValue. If the prompt was cancelled by the user, the implementation should return false; otherwise the result should be written to result and true should be returned. If the prompt was not cancelled by the user, the implementation should return true and the result string must not be null. The default implementation uses QInputDialog8b7c:f320:99b9:690f:4595:cd17:293a:c069getText(). 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069linkHovered(const QString &url) This signal is emitted when the mouse hovers over a link. url contains the target URL of the link. 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069load(const QUrl &url) Loads url into this page. Note: The view remains the same until enough data has arrived to display the new URL.
See also setUrl(), setHtml(), and setContent(). 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069load(const QWebEngineHttpRequest &request) Issues the specified request and loads the response. This function was introduced in Qt 5.9. See also load(), setUrl(), url(), urlChanged(), and QUrl8b7c:f320:99b9:690f:4595:cd17:293a:c069romUserInput(). 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069loadFinished(bool ok) This signal is emitted when the page finishes loading content. This signal is independent of script execution or page rendering. ok will indicate whether the load was successful or any error occurred. See also loadStarted(). 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069loadProgress(int progress) This signal is emitted when the global progress status changes. The current value is provided by progress and scales from 0 to 100, which is the default range of QProgressBar. It accumulates changes from all the child frames. 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069loadStarted() This signal is emitted when a page starts loading content. See also loadFinished(). 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069pdfPrintingFinished(const QString &filePath, bool success) This signal is emitted when printing the web page into a PDF file has finished. filePath will contain the path the file was requested to be created at, and success will be true if the file was successfully created and false otherwise. This function was introduced in Qt 5.9. See also printToPdf(). 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069print(QPrinter *printer, FunctorOrLambda resultCallback) Renders the current content of the page into a temporary PDF document, then prints it using printer. The settings for creating and printing the PDF document will be retrieved from the printer object. It is the users responsibility to ensure the printer remains valid until resultCallback has been called. The resultCallback must take a boolean as parameter. If printing was successful, this boolean will have the value true, otherwise, its value will be false. This function was introduced in Qt 5.8. 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069printToPdf(const QString &filePath, const QPageLayout &pageLayout = QPageLayout( QPageSize( QPageSiz8b7c:f320:99b9:690f:4595:cd17:293a:c069A4 ), QPageLayout8b7c:f320:99b9:690f:4595:cd17:293a:c069Portrait, QMarginsF() )) Renders the current content of the page into a PDF document and saves it in the location specified in filePath. The page size and orientation of the produced PDF document are taken from the values specified in pageLayout. This method issues an asynchronous request for printing the web page into a PDF and returns immediately. To be informed about the result of the request, connect to the signal pdfPrintingFinished(). If a file already exists at the provided file path, it will be overwritten. This function was introduced in Qt 5.7. See also pdfPrintingFinished(). 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069printToPdf(FunctorOrLambda resultCallback, const QPageLayout &pageLayout = QPageLayout( QPageSize( QPageSiz8b7c:f320:99b9:690f:4595:cd17:293a:c069A4 ), QPageLayout8b7c:f320:99b9:690f:4595:cd17:293a:c069Portrait, QMarginsF() )) Renders the current content of the page into a PDF document and returns a byte array containing the PDF data as parameter to resultCallback. The page size and orientation of the produced PDF document are taken from the values specified in pageLayout. The resultCallback must take a const reference to a QByteArray as parameter. If printing was successful, this byte array will contain the PDF data, otherwise, the byte array will be empty. This function was introduced in Qt 5.7. 
QWebEngineProfile *QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069profile() const Returns the web engine profile the page belongs to. This function was introduced in Qt 5.5. 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069proxyAuthenticationRequired(const QUrl &requestUrl, QAuthenticator *authenticator, const QString &proxyHost) This signal is emitted when access to requestUrl via proxyHost requires authentication for the proxy. authenticator should be used to pass the user name and password for the connection. 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069recentlyAudibleChanged(bool recentlyAudible) This signal is emitted when the page's audible state, recentlyAudible, changes, because the audio is played or stopped. Note: The signal is also emitted when calling the setAudioMuted() method. Also, if the audio is paused, this signal is emitted with an approximate two-second delay, from the moment the audio is paused.
This function was introduced in Qt 5.7. Note: Notifier signal for property recentlyAudible.  
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069renderProcessTerminated(RenderProcessTerminationStatus terminationStatus, int exitCode) This signal is emitted when the render process is terminated with a non-zero exit status. terminationStatus is the termination status of the process and exitCode is the status code with which the process terminated. This function was introduced in Qt 5.6. 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069replaceMisspelledWord(const QString &replacement) Replace the current misspelled word with replacement. The current misspelled word can be found in QWebEngineContextMenuDat8b7c:f320:99b9:690f:4595:cd17:293a:c069misspelledWord(), and suggested replacements in QWebEngineContextMenuDat8b7c:f320:99b9:690f:4595:cd17:293a:c069spellCheckerSuggestions(). This function was introduced in Qt 5.8. See also contextMenuData(). 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069runJavaScript(const QString &scriptSource, quint32 worldId, FunctorOrLambda resultCallback) Runs the JavaScript code contained in scriptSource in the world specified by worldId. The world ID values are the same as provided by QWebEngineScript8b7c:f320:99b9:690f:4595:cd17:293a:c069ScriptWorldId. Using the runJavaScript() versions without the world ID is the same as running the script in the MainWorld. When the script has been executed, resultCallback is called with the result of the last executed statement. resultCallback can be any of a function pointer, a functor or a lambda, and it is expected to take a QVariant parameter. For example: page.runJavaScript("document.title", [](const QVariant &v) { qDebug() << v.toString(); }); Warning: Do not execute lengthy routines in the callback function, because it might block the rendering of the web engine page. See scripts() for an alternative API to inject scripts. This function was introduced in Qt 5.7. See also QWebEngineScript8b7c:f320:99b9:690f:4595:cd17:293a:c069ScriptWorldId. 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069runJavaScript(const QString &scriptSource, quint32 worldId) This function overloads runJavaScript(). This convenience function runs the JavaScript code contained in scriptSource in the world specified by worldId. This function was introduced in Qt 5.7. 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069runJavaScript(const QString &scriptSource, FunctorOrLambda resultCallback) This function overloads runJavaScript(). Runs the JavaScript code contained in scriptSource. The script will run in the same world as other scripts that are part of the loaded site. When the script has been executed, resultCallback is called with the result of the last executed statement. See also QWebEngineScript8b7c:f320:99b9:690f:4595:cd17:293a:c069MainWorld. 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069runJavaScript(const QString &scriptSource) This function overloads runJavaScript(). This convenience function runs the JavaScript code contained in scriptSource in the same world as other scripts that are part of the loaded site. See also QWebEngineScript8b7c:f320:99b9:690f:4595:cd17:293a:c069MainWorld. 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069save(const QString &filePath, QWebEngineDownloadItem8b7c:f320:99b9:690f:4595:cd17:293a:c069SavePageFormat format = QWebEngineDownloadItem8b7c:f320:99b9:690f:4595:cd17:293a:c069MimeHtmlSaveFormat) const Save the currently loaded web page to disk. The web page is saved to filePath in the specified format. This is a short cut for the following actions:  Trigger the Save web action. Accept the next download item and set the specified file path and save format.  This function issues an asynchronous download request for the web page and returns immediately. This function was introduced in Qt 5.8. See also QWebEngineDownloadItem8b7c:f320:99b9:690f:4595:cd17:293a:c069SavePageFormat. 
QWebEngineScriptCollection &QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069scripts() Returns the collection of scripts that are injected into the page. In addition, a page might also execute scripts added through QWebEngineProfil8b7c:f320:99b9:690f:4595:cd17:293a:c069scripts(). See also QWebEngineScriptCollection and QWebEngineScript. 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069selectionChanged() This signal is emitted whenever the selection changes, either interactively or programmatically. For example, by calling triggerAction() with a selection action. See also selectedText(). 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069setContent(const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl()) Sets the content of the web page to data. If the mimeType argument is empty, it is assumed that the content is text/plain,charset=US-ASCII. External objects referenced in the content are located relative to baseUrl. The 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. See also toHtml() and setHtml(). 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069setFeaturePermission(const QUrl &securityOrigin, Feature feature, PermissionPolicy policy) Sets the permission for the web site identified by securityOrigin to use feature to policy. Note: Call this method on the featurePermissionRequested() signal, as it is meant to serve pending feature requests only. Setting feature permissions ahead of a request has no effect.
See also featurePermissionRequested() and featurePermissionRequestCanceled(). 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069setHtml(const QString &html, const QUrl &baseUrl = QUrl()) Sets the content of this page to html. baseUrl is optional and used to resolve relative URLs in the document, such as referenced images or stylesheets. The html is loaded immediately; external objects are loaded asynchronously. If a script in the 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 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. See also toHtml(), setContent(), and load(). 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069setView(QWidget *view) Sets the view that is associated with the web page. See also view(). 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069setWebChannel(QWebChannel *channel, uint worldId) Sets the web channel instance to be used by this page to channel and connects it to web engine's transport using Chromium IPC messages. The transport is exposed in the JavaScript world worldId as qt.webChannelTransport, which should be used when using the Qt WebChannel JavaScript API. Note: The page does not take ownership of the channel object.
Note: Only one web channel can be installed per page, setting one even in another JavaScript world uninstalls any already installed web channel.
This function was introduced in Qt 5.7. See also webChannel() and QWebEngineScript8b7c:f320:99b9:690f:4595:cd17:293a:c069ScriptWorldId. 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069setWebChannel(QWebChannel *channel) This is an overloaded function. Sets the web channel instance to be used by this page to channel and installs it in the main JavaScript world. With this method the web channel can be accessed by web page content. If the content is not under your control and might be hostile, this could be a security issue and you should consider installing it in a private JavaScript world. This function was introduced in Qt 5.5. See also QWebEngineScript8b7c:f320:99b9:690f:4595:cd17:293a:c069MainWorld. 
QWebEngineSettings *QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069settings() const Returns a pointer to the page's settings object. See also QWebEngineSettings8b7c:f320:99b9:690f:4595:cd17:293a:c069globalSettings(). 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069titleChanged(const QString &title) This signal is emitted whenever the title of the page changes. The title string specifies the new title. See also title(). 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069toHtml(FunctorOrLambda resultCallback) const Asynchronous method to retrieve the page's content as HTML, enclosed in HTML and BODY tags. Upon successful completion, resultCallback is called with the page's content. Note: resultCallback can be any of a function pointer, a functor or a lambda, and it is expected to take a QString parameter.
See also setHtml() and toPlainText(). 
void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069toPlainText(FunctorOrLambda resultCallback) const Asynchronous method to retrieve the page's content converted to plain text, completely stripped of all HTML formatting. Upon successful completion, resultCallback is called with the page's content. Note: resultCallback can be any of a function pointer, a functor or a lambda, and it is expected to take a QString parameter.
See also toHtml(). 
[virtual] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069triggerAction(WebAction action, bool checked = false) This function can be called to trigger the specified action. It is also called by Qt WebEngine if the user triggers the action, for example through a context menu item. If action is a checkable action, then checked specifies whether the action is toggled or not. See also action(). 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069urlChanged(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 url. See also url(). 
QWidget *QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069view() const Returns the view widget that is associated with the web page. See also setView(). 
QWebChannel *QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069webChannel() const Returns a pointer to the web channel instance used by this page or a null pointer if none was set. This channel automatically uses the internal web engine transport mechanism over Chromium IPC that is exposed in the JavaScript context of this page as qt.webChannelTransport. This function was introduced in Qt 5.5. See also setWebChannel(). 
[signal] void QWebEnginePag8b7c:f320:99b9:690f:4595:cd17:293a:c069windowCloseRequested() This signal is emitted whenever the page requests the web browser window to be closed, for example through the JavaScript window.close() call. See also RequestClose.

    
{'path': 'public/docs/qt~5.9/qwebenginepage.html', 'source': 'DevDocs.IO'}