This repository has been archived on 2022-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
fanny-app/qml/Forms/WebsiteForm.qml

48 lines
1.1 KiB
QML
Raw Normal View History

2018-06-21 16:41:02 +02:00
import QtQuick 2.9
import QtWebView 1.1
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.2
Page {
id:root
objectName: "WebsitePage";
title: qsTr("Fanny Webseite")
2018-07-19 20:08:46 +02:00
property string icon: "qrc:/graphics/FannyLogo_small.png"
property string link: "http://www.fanny-leicht.de/j34"
2018-06-30 20:59:42 +02:00
2018-06-21 16:41:02 +02:00
ProgressBar {
id: progress
width: parent.width
anchors {
top: parent.top
}
//z: Qt.platform.os === "android" ? -1 : 1
visible: webView.loadProgress < 100
2018-07-06 13:29:16 +02:00
value: webView.loadProgress === 100 ? 0 : webView.loadProgress / 100
2018-06-21 16:41:02 +02:00
}
WebView {
id: webView
2018-07-19 20:08:46 +02:00
Keys.onBackPressed: webView.goBack()
z: 0
2018-06-21 16:41:02 +02:00
anchors {
top: webView.loadProgress < 100 ? progress.bottom:parent.top
bottom: parent.bottom
left: parent.left
right: parent.right
}
2018-07-19 20:08:46 +02:00
url: link
2018-06-21 16:41:02 +02:00
onLoadingChanged: {
2018-07-19 20:08:46 +02:00
console.log(url)
2018-06-21 16:41:02 +02:00
if (loadRequest.errorString)
console.error(loadRequest.errorString);
}
2018-06-30 20:59:42 +02:00
}
2018-06-21 16:41:02 +02:00
}