1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00
ScreenPlay/ScreenPlayWallpaper/qml/WebsiteWallpaper.qml

33 lines
940 B
QML
Raw Normal View History

import QtQuick
import QtWebEngine
import ScreenPlayWallpaper
2020-12-28 17:26:56 +01:00
Item {
id: root
2021-05-16 19:37:55 +02:00
property string url
2020-12-28 17:26:56 +01:00
Component.onCompleted: {
2021-05-16 19:37:55 +02:00
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;
2020-12-28 17:26:56 +01:00
}
WebEngineView {
id: webView
2021-05-16 19:37:55 +02:00
2020-12-28 17:26:56 +01:00
anchors.fill: parent
url: Qt.resolvedUrl(root.url)
2020-12-28 17:26:56 +01:00
onJavaScriptConsoleMessage: print(lineNumber, message)
onLoadProgressChanged: {
if (loadProgress === 100)
2023-06-11 10:07:39 +02:00
Wallpaper.requestFadeIn();
2020-12-28 17:26:56 +01:00
}
}
}