Obsolete Members for WebEngineView
The following members of QML type WebEngineView are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.
Signals
- activeFocusOnPressChanged(bool activeFocusOnPress)
- audioMutedChanged(bool muted)
- authenticationDialogRequested(AuthenticationDialogRequest request)
- backgroundColorChanged()
- certificateError(WebEngineCertificateError error)
- colorDialogRequested(ColorDialogRequest request)
- contextMenuRequested(ContextMenuRequest request)
- featurePermissionRequested(url securityOrigin, Feature feature)
- fileDialogRequested(FileDialogRequest request)
- fullScreenRequested(FullScreenRequest request)
- geometryChangeRequested(rect geometry, rect frameGeometry)
- javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, string message, int lineNumber, string sourceID)
- javaScriptDialogRequested(JavaScriptDialogRequest request)
- linkHovered(url hoveredUrl)
- loadingChanged(WebEngineLoadRequest loadRequest)
- navigationRequested(WebEngineNavigationRequest request)
- newViewRequested(WebEngineNewViewRequest request)
- pdfPrintingFinished(string filePath, bool success)
- printRequest()
- quotaRequested(QuotaRequest request)
- recentlyAudibleChanged(bool recentlyAudible)
- registerProtocolHandlerRequested(RegisterProtocolHandlerRequest request)
- renderProcessTerminated(RenderProcessTerminationStatus terminationStatus, int exitCode)
- wasRecentlyAudibleChanged(bool wasRecentlyAudible)
- windowCloseRequested()
Signal Documentation
activeFocusOnPressChanged(bool activeFocusOnPress) |
This signal is emitted when the ability of the web engine view to get focus when clicked changes.
This signal was introduced in QtWebEngine 1.2.
See also setActiveFocusOnPress().
audioMutedChanged(bool muted) |
This signal is emitted when the page's audio is (un)muted using audioMuted property.
Note: Not to be confused with a specific HTML5 audio / video element being muted.
This signal was introduced in QtWebEngine 1.3.
See also audioMuted and recentlyAudibleChanged.
authenticationDialogRequested(AuthenticationDialogRequest request) |
This signal is emitted when an authentication dialog is requested.
The request can be handled by using the methods of the AuthenticationDialogRequest type.
Note: Signal handlers need to call request.accepted = true
to prevent a default dialog from showing up. Make sure to call either AuthenticationDialogRequest::dialogAccept() or AuthenticationDialogRequest::dialogReject() afterwards.
This signal was introduced in QtWebEngine 1.4.
This signal is emitted when the web engine view background color changes.
This signal was introduced in QtWebEngine 1.2.
certificateError(WebEngineCertificateError error) |
This signal is emitted when an invalid certificate error is raised while loading a given request.
The certificate error can be handled by using the methods of the WebEngineCertificateError type.
This signal was introduced in QtWebEngine 1.1.
colorDialogRequested(ColorDialogRequest request) |
This signal is emitted when a color picker dialog is requested.
The request can be handled by using the methods of the ColorDialogRequest type.
Note: Signal handlers need to call request.accepted = true
to prevent a default dialog from showing up. Make sure to call either ColorDialogRequest::dialogAccept() or ColorDialogRequest::dialogReject() afterwards.
This signal was introduced in QtWebEngine 1.4.
contextMenuRequested(ContextMenuRequest request) |
This signal is emitted when a context menu is requested.
The request can be handled by using the properties of the ContextMenuRequest type.
Note: Signal handlers need to call request.accepted = true
to prevent a default context menu from showing up.
This signal was introduced in QtWebEngine 1.4.
featurePermissionRequested(url securityOrigin, Feature feature) |
This signal is emitted when the web site identified by securityOrigin requests to make use of the resource or device identified by feature.
This signal was introduced in QtWebEngine 1.1.
See also grantFeaturePermission().
fileDialogRequested(FileDialogRequest request) |
This signal is emitted when a file picker dialog is requested.
The request error can be handled by using the methods of the FileDialogRequest type.
Note: Signal handlers need to call request.accepted = true
to prevent a default dialog from showing up. Make sure to call either FileDialogRequest::dialogAccept() or FileDialogRequest::dialogReject() afterwards.
This signal was introduced in QtWebEngine 1.4.
fullScreenRequested(FullScreenRequest request) |
This signal is emitted when the web page requests fullscreen mode through the JavaScript API.
This signal was introduced in QtWebEngine 1.1.
See also isFullScreen.
This signal is emitted whenever the document wants to change the position and size of the page to frameGeometry. This can happen for example through JavaScript.
While frameGeometry includes, geometry excludes the size of frame margins.
Note: Geometry related properties of QML Window expect a size excluding the window decoration. You have to use geometry to handle this signal correctly.
onGeometryChangeRequested: { window.x = geometry.x window.y = geometry.y window.width = geometry.width window.height = geometry.height }
This signal was introduced in QtWebEngine 1.7.
This signal is emitted when a JavaScript program tries to print a 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.
If no handler is specified, the view will log the messages into a js
logging category.
See also Console Logging.
javaScriptDialogRequested(JavaScriptDialogRequest request) |
This signal is emitted when a JavaScript dialog is requested.
The request can be handled by using the methods of the JavaScriptDialogRequest type.
Note: Signal handlers need to call request.accepted = true
to prevent a default dialog from showing up. Make sure to call either JavaScriptDialogRequest::dialogAccept() or JavaScriptDialogRequest::dialogReject() afterwards.
This signal was introduced in QtWebEngine 1.4.
linkHovered(url hoveredUrl) |
Within a mouse-driven interface, this signal is emitted when a mouse pointer passes over a link, corresponding to the mouseover
DOM event. This event may also occur in touch interfaces for mouseover
events that are not cancelled with preventDefault()
. hoveredUrl provides the link's location.
loadingChanged(WebEngineLoadRequest loadRequest) |
This signal is emitted when a page load begins, ends, or fails.
When handling the signal with onLoadingChanged
, various read-only parameters are available on the WebEngineLoadRequest specified by loadRequest.
See also loading, LoadStatus, and ErrorDomain.
navigationRequested(WebEngineNavigationRequest request) |
This signal is emitted when the navigation request request is issued.
newViewRequested(WebEngineNewViewRequest request) |
This signal is emitted when a page load is requested to happen in a separate web engine view. This can either be because the current page requested it explicitly through a JavaScript call to window.open
, or because the user clicked on a link while holding Shift, Ctrl, or a built-in combination that triggers the page to open in a new window.
If this signal is not handled, the requested load will fail.
An example implementation:
QtObject { id: windowParent // Create the initial browsing windows and open the startup page. Component.onCompleted: { var firstWindow = windowComponent.createObject(windowParent); firstWindow.webView.loadHtml('<input type="button" value="Click!" onclick="window.open("http://qt.io")">'); } property Component windowComponent: Window { // Destroy on close to release the Window's QML resources. // Because it was created with a parent, it won't be garbage-collected. onClosing: destroy() visible: true property WebEngineView webView: webView_ WebEngineView { id: webView_ anchors.fill: parent // Handle the signal. Dynamically create the window and // use its WebEngineView as the destination of our request. onNewViewRequested: function(request) { var newWindow = windowComponent.createObject(windowParent); request.openIn(newWindow.webView); } } } }
This signal was introduced in QtWebEngine 1.1.
See also NewViewDestination and WebEngine Quick Nano Browser.
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 signal was introduced in QtWebEngine 1.5.
See also printToPdf().
This signal is emitted when the JavaScript window.print()
method is called. Typically, the signal handler can simply call printToPdf().
This signal was introduced in QtWebEngine 1.8.
See also printToPdf.
quotaRequested(QuotaRequest request) |
This signal is emitted when the web page requests larger persistent storage than the application's current allocation in File System API. The default quota is 0 bytes.
This signal was introduced in QtWebEngine 1.7.
See also QuotaRequest.
recentlyAudibleChanged(bool recentlyAudible) |
This signal is emitted when the page's audible state is changed, due to audio being played or stopped.
Note: The signal is also emitted when the audioMuted property changes. Also if the audio is paused, this signal is emitted with an approximate two-second delay, from the moment the audio is paused.
This signal is also emitted for Flash plugin audio.
If a web page contains two videos that are started in sequence, this signal gets emitted only once, for the first video to generate sound. After both videos are stopped, the signal is emitted upon the last sound generated. This means that the signal is emitted both when any kind of sound is generated and when everything is completely silent within a web page, regardless of the number of audio streams.
Spurious signal emissions might also happen. For example, when sound is stopped, this signal gets emitted first with a value of true
, and then with a value of false
. Further, when audio starts playing, the signal is emitted twice with a value of true
.
This signal was introduced in QtWebEngine 1.3.
See also recentlyAudible.
registerProtocolHandlerRequested(RegisterProtocolHandlerRequest request) |
This signal is emitted when the web page tries to register a custom protocol using the registerProtocolHandler API.
This signal was introduced in QtWebEngine 1.7.
See also RegisterProtocolHandlerRequest.
renderProcessTerminated(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 signal was introduced in QtWebEngine 1.2.
See also RenderProcessTerminationStatus.
wasRecentlyAudibleChanged(bool wasRecentlyAudible) |
This signal is emitted when the page's audible state is changed, due to audio being 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 2 second delay, from the moment the audio is paused.
This signal was introduced in QtWebEngine 1.3.
This signal is emitted whenever the page requests the web browser window to be closed, for example through the JavaScript window.close()
call.
This signal was introduced in QtWebEngine 1.2.
© 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.