1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-06 19:12:30 +01:00
ScreenPlay/ScreenPlayWallpaper/qml/WebsiteWallpaper.qml
Elias Steurer 77daa040bb Fix HTML Wallpaper
Remove old WebView that is now MultimediaWebView
2021-11-12 14:56:22 +01:00

37 lines
971 B
QML

import QtQuick
import QtWebEngine
import ScreenPlayWallpaper 1.0
Item {
id: root
property string url
signal requestFadeIn()
Component.onCompleted: {
WebEngine.settings.localContentCanAccessFileUrls = true;
WebEngine.settings.localContentCanAccessRemoteUrls = true;
WebEngine.settings.allowRunningInsecureContent = true;
WebEngine.settings.accelerated2dCanvasEnabled = true;
WebEngine.settings.javascriptCanOpenWindows = false;
WebEngine.settings.showScrollBars = false;
WebEngine.settings.playbackRequiresUserGesture = false;
WebEngine.settings.focusOnNavigationEnabled = true;
}
WebEngineView {
id: webView
anchors.fill: parent
url: Qt.resolvedUrl(root.url)
onJavaScriptConsoleMessage: print(lineNumber, message)
onLoadProgressChanged: {
if ((loadProgress === 100))
root.requestFadeIn();
}
}
}