Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtWebEngine 1.5
- import QtQuick 2.10
- import QtQuick.Layouts 1.3
- StackLayout {
- width: 1920
- height: 1080
- objectName: "tabs"
- ColumnLayout{
- Image {
- source: "bg.png"
- fillMode: Image.Pad
- horizontalAlignment: Image.AlignLeft
- verticalAlignment: Image.AlignTop
- }
- Text {
- objectName: "text"
- color: "white"
- font.family: "DejaVu"
- font.pointSize: 24
- Layout.fillHeight: true
- Layout.fillWidth: true
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- WebEngineView {
- profile: WebEngineProfile{
- offTheRecord: true
- spellCheckEnabled: false
- }
- id: game_webview
- objectName: "game"
- backgroundColor: "black"
- antialiasing: true
- signal game_reload()
- signal game_url(string url)
- Component.onCompleted: {
- game_reload.connect(reload)
- game_url.connect(setUrl)
- }
- onContextMenuRequested: function(request) {
- request.accepted = true;
- }
- function setUrl(newurl) {
- url = Qt.resolvedUrl(newurl)
- }
- onRenderProcessTerminated: function(status, exit) {
- game_timer.running = true;
- }
- Timer {
- id: game_timer
- interval: 0
- running: false
- repeat: false
- onTriggered: game_webview.reload()
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement