Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use Sailfish WebView to render page
  • Loading branch information
llewelld committed Apr 20, 2022
1 parent daa8aef commit 5be5e3e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
20 changes: 10 additions & 10 deletions qml/pages/WebViewPage.qml
@@ -1,22 +1,22 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtWebKit 3.0
import QtWebKit.experimental 1.0
import Sailfish.WebView 1.0
import Sailfish.WebEngine 1.0
import Sailfish.WebView.Popups 1.0

Page {
id: page
allowedOrientations: Orientation.All

SilicaWebView {
WebView {
anchors.fill: parent
url: "http://www.sailfishos.org"
privateMode: true
httpUserAgent: "Mozilla/5.0 (Mobile; rv:78.0) Gecko/78.0 Firefox/78.0"

experimental.temporaryCookies: true
experimental.userAgent: "Mozilla/5.0 (Mobile Linux; U; like Android 4.4.3;"
+ " Sailfish OS/2.0) AppleWebkit/535.19 (KHTML, like Gecko)"
+ " Version/4.0 Mobile Safari/535.19"
experimental.autoCorrect: false
experimental.deviceWidth: parent.width
experimental.deviceHeight: parent.height
popupProvider: PopupProvider {
// Disable the Save Password dialog
passwordManagerPopup: null
}
}
}
4 changes: 4 additions & 0 deletions rpm/harbour-webview.spec
Expand Up @@ -17,6 +17,10 @@ URL: https://github.com/black-sheep-dev/harbour-webview-example
Source0: %{name}-%{version}.tar.bz2
Source100: harbour-webview.yaml
Requires: sailfishsilica-qt5 >= 0.10.9
Requires: qtmozembed-qt5
Requires: sailfish-components-webview-qt5
Requires: sailfish-components-webview-qt5-popups
Requires: sailfish-components-webview-qt5-pickers
BuildRequires: pkgconfig(sailfishapp) >= 1.0.2
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Qml)
Expand Down

0 comments on commit 5be5e3e

Please sign in to comment.