peerplays_migrated/programs/full_web_node/qml/main.qml

38 lines
885 B
QML
Raw Normal View History

import QtQuick 2.5
import QtQuick.Window 2.2
import QtWebEngine 1.0
2015-08-14 19:09:21 +00:00
import Graphene.FullNode 1.0
Window {
2015-08-12 18:56:33 +00:00
id: window
width: Screen.width / 2
height: Screen.height / 2
2015-08-14 19:09:21 +00:00
visible: true
2015-08-14 19:09:21 +00:00
BlockChain {
id: blockChain
onStarted: {
2015-09-17 21:55:47 +00:00
var url = "qrc:/index.html#auth/" + webUsername + ":" + webPassword
console.log("Loading %1 in web view".arg(url))
webView.url = url
}
2015-08-14 19:09:21 +00:00
}
Component.onCompleted: blockChain.start()
2015-08-12 18:56:33 +00:00
Rectangle { anchors.fill: parent; color: "#1F1F1F" }
2015-08-14 19:09:21 +00:00
Text {
font.pointSize: 20
anchors.centerIn: parent
text: qsTr("Loading...")
color: "white"
}
WebEngineView {
2015-08-14 19:09:21 +00:00
id: webView
visible: false
anchors.fill: parent
2015-08-14 19:09:21 +00:00
onLoadProgressChanged: if (loadProgress === 100) visible = true
onJavaScriptConsoleMessage: console.log(JSON.stringify(arguments))
}
}