A component for displaying web content. More...
| Import Statement: | import . |
WPEView is a component for displaying web content which is implemented using native APIs on the platforms where this is available, thus it does not necessarily require including a full web browser stack as part of the application.
WPEView provides an API compatible with Qt's QtWebView component. However WPEView is limited to Linux platforms supporting EGL KHR extensions. WPEView was successfully tested with the EGLFS and Wayland-EGL QPAs.
This only exists in the Sailfish OS version, since 0.1.1
| Constant | Value |
|---|---|
AllowAllCookies | |
AllowNoCookies | |
NoThirdPartyCookies |
This only exists in the Sailfish OS version, since 0.1.1
| Constant | Value |
|---|---|
AlertDialog | |
ConfirmDialog | |
PromptDialog | |
UnloadDialog |
This only exists in the Sailfish OS version, since 0.1.1
| Constant | Value |
|---|---|
FeatureEmbedder | |
FeatureUnstable | |
FeatureInternal | |
FeatureDeveloper | |
FeatureTestable | |
FeaturePreview | |
FeatureStable | |
FeatureMature |
This only exists in the Sailfish OS version, since 0.1.1
| Constant | Description |
|---|---|
DefaultProxy | |
CustomProxy | |
NoProxy | , |
This only exists in the Sailfish OS version, since 0.1.1
| Constant | Value |
|---|---|
SettingTypeBool | |
SettingTypeDouble | |
SettingTypeString | |
SettingTypeStringList |
This only exists in the Sailfish OS version, since 0.1.1
The background color of the currently loaded web page. Can be used to set one should the web page not define it.
The default is plain white, or the background color of the applications window, if accessible.
Holds true if it's currently possible to navigate back in the web history.
Holds true if it's currently possible to navigate forward in the web history.
This only exists in the Sailfish OS version, since 0.1.1
If enabled true, write JavaScript console messages to Standard Output (terminal).
See also WPEWebKitSettingsRef.
This only exists in the Sailfish OS version, since 0.1.1
Enables JavaScript execution.
This only exists in the Sailfish OS version, since 0.1.1
Enables Private Mode.
In Private Mode, no session information or caches are stored persistently.
This only exists in the Sailfish OS version, since 0.1.1
true if Intelligent Tracking Protection is currently enabled, false otherwise.
See also WPEWebKitNetworkSessionRef, WebKit, and ITP.
This only exists in the Sailfish OS version, since 0.1.1
Holds the WebKit Features list, grouped by their category as properties.
The value of each category attribute is a list of objects, with the following properties:
id the internal name of the feature (to be used in enableFeature)name the user-displayable name of the featuredetails the description of the featuredefaultEnabled Whether the features enabled by default.isEnabled Whether the features is currently enabled.featureStatus the FeatureStatusSee also FeatureStatus and enableFeature.
This only exists in the Sailfish OS version, since 0.1.1
Convenience property to detect that we have loaded the Sailfish OS Fork. Applications may disable features, or show a warning if this is false.
This only exists in the Sailfish OS version, since 0.1.1
Whether this instance is considered the master view.
Only one view per app should have this set to true, other views are considered to be related to the master view if their isMaster property is set to false.
The default value is true.
The current load progress of the web content, represented as an integer between 0 and 100.
Holds true if the WPEView is currently in the process of loading new content, false otherwise.
See also loadingChanged().
This only exists in the Sailfish OS version, since 0.1.1
Returns a list of certificate info objects representing the cerificate chain
See also tlsError.
url : url |
The URL of currently loaded web page. Changing this will trigger loading new content.
The URL is used as-is. URLs that originate from user input should be parsed with QUrl::fromUserInput().
Note: The WPEView does not support loading content through the Qt Resource system.
This only exists in the Sailfish OS version, since 0.1.1
Returns the version of WPE WebKit the plugin was built against.
This only exists in the Sailfish OS version, since 0.1.1
Holds the current Web Page zoom factor.
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted when a download has failed.
destination is the name of the destination file (if any), message is the error message.
See also downloadProgress, downloadFinished, and download.
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted when an ongoing download has finished.
destination is the name of the destination file (if any), time_elapsed is the time the download took, in seconds.
Note: You will receive this signal also if the download failed, in addition to downloadFailed.
See also downloadProgress, downloadFailed, and download.
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted when an ongoing download had some progress.
destination is the name of the destination file (if any), progress is the estimated progress in percent, time_elapsed is the time the download took so far, in seconds downloaded is the amount of data downloaded, in Bytes.
See also downloadFailed, downloadFinished, and download.
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted each time WebKit has finished rendering a frame.
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted when an ITP Summary has been generated.
result contains a QVariantList with the ITP statistics.
requestItpSummary must have been called to trigger this.
See also requestItpSummary.
loadingChanged(WPEViewLoadRequest loadRequest) |
This signal is emitted when the state of loading the web content changes. By handling this signal it's possible, for example, to react to page load errors.
The loadRequest parameter holds the url and status of the request, as well as an errorString containing an error message for a failed request.
See also WPEViewLoadRequest.
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted when the mouse cursor moves over an element such as a link, image or a media element.
event contains details about the mouse target.
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted if something was called that is not supported. message may contain a description of the reason.
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted when searchOnPage has been invoked.
count holds the number of results.
See also searchOnPage.
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted when the Web Page wants to show a Notification.
Applications are expected to handle this signal by showing a UI dialog.
showDialog(WPEView::DialogType type, string message) |
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted when the Web Page wants to show a Notification.
Applications are expected to handle this signal by showing a UI dialog.
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted when the Web Page wants to show a Notification.
Applications are expected to handle this signal by showing a UI dialog.
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted when the Web Page wants to show a Notification.
Applications are expected to handle this signal by showing a UI dialog.
This only exists in the Sailfish OS version, since 0.1.1
This signal is emitted when loading the web content had a TLS error.
The errors parameter holds a list of error names, and certinfo the certification information.
See tlsInfo for the format of certinfo.
See also WPEViewLoadRequest and tlsInfo.
This only exists in the Sailfish OS version, since 0.1.1
Uploads the contents of filter to the User Content Filter Store, and, if successful, loads the contents into the User Filter Manager and enables them.
Note: for large filter files, applyContentFilterFile shold be used instead.
See also applyContentFilterFile.
This only exists in the Sailfish OS version, since 0.1.1
Uploads the content filter file at filePath to the User Content Filter Store, and, if successful, loads the contents into the User Filter Manager and enables them.
This only exists in the Sailfish OS version, since 0.1.1 Configures web font families for content that does not specify a font.
See also configureFontSizes and WPEWebKitSettingsRef.
This only exists in the Sailfish OS version, since 0.1.1 Configures web font sizes.
See also configureFontFamilies and WPEWebKitSettingsRef.
void configureProxy(ProxyMode mode, stringproxyUri, list<QString> ignore_hosts) const |
This only exists in the Sailfish OS version, since 0.1.1 Configures a Network Proxy.
See also WPEWebKitNetworkSessionRef.
This only exists in the Sailfish OS version, since 0.1.1
Sets the WebKit Feature with ID feature to value enable.
See also WPEWebKitFeatureRef and resetFeature.
void loadHtml(string html, url baseUrl) |
Loads the specified html content to the web view.
This method offers a lower-level alternative to the url property, which references HTML pages via URL.
External objects such as stylesheets or images referenced in the HTML document should be located relative to baseUrl. For example, if html is retrieved from http://www.example.com/documents/overview.html, which is the base URL, then an image referenced with the relative url, diagram.png, should be at http://www.example.com/documents/diagram.png.
Note: The WPEView does not support loading content through the Qt Resource system.
See also url.
This only exists in the Sailfish OS version, since 0.1.1
Reloads the current url. If bypass_cache is true, the reload will skip any caches.
This only exists in the Sailfish OS version, since 0.1.1
Request a report of ITP statistics.
Will return false if ITP is not enabled, or no network session is available. Will return true if an ITP summary can be generated.
Applications must handle the itpSummaryAvailable signal to actually receive the report.
This only exists in the Sailfish OS version, since 0.1.1
This function overloads enableFeature.
Reset WebKit Feature feature to default.See also WPEWebKitFeatureRef.
Runs the specified JavaScript. In case a callback function is provided, it will be invoked after the script finished running.
runJavaScript("document.title", function(result) { console.log(result); });
This only exists in the Sailfish OS version, since 0.1.1
Search the currently loaded web page for text query.
Emits searchFoundResults with the results.
See also searchFoundResults.
This only exists in the Sailfish OS version, since 0.1.1
This method is invoked when the web page wants to show a selection.
Note: Applications are expected to implement a QML function of this name and signature, which must return a reference to the QML Dialog.
See the documentation of WPEOptionDialogProxy for details.
Stops loading the current url.
This only exists in the Sailfish OS version, since 0.1.1 Update the Memory Pressure settings for the current web process.
See The WPE WebKit Documentation for details.
Warning: Take into account that badly defined parameters can greatly reduce the performance of the engine. For example, setting memory limit too low with a fast poll interval can cause the process to constantly be trying to release memory.
This only exists in the Sailfish OS version, since 0.1.1
Enable Product Branding in the User Agent.
If enable is true, name version and comment will be appended to the default User Agent.
For example, if name is "Twix", version is "2.0", and comment is "like Raider", this will produce Twix/2.0 (like Raider)
The required slash and brackets are added automatically.
Calling this method with enable set to false and no other parameters will reset the string to default.
Note: Sending a branded User Agent header will make Fingerprinting easier, and may cause some sites to send the wrong content, or not work at all.
This only exists in the Sailfish OS version, since 0.1.1
Zooms into the web page by a factor of 10%
This only exists in the Sailfish OS version, since 0.1.1
Zooms out of the web page by a factor of 10%
QML Plugin Sailfish OS WPE WebView Documentation Copyright (c) 2026 SailfishOS contributors. This document may be used under the terms of the Creative Commons Attribution Share Alike 4.0 International License.