Fummeljob hierum darum
This commit is contained in:
47
Gui/ReadMe.qml
Normal file
47
Gui/ReadMe.qml
Normal file
@@ -0,0 +1,47 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
Window
|
||||
{
|
||||
property alias readMeWin: readMeWin
|
||||
id: readMeWin
|
||||
width: 400
|
||||
height: 300
|
||||
title: "PYQCRM - README"
|
||||
color: palette.base
|
||||
|
||||
ScrollView
|
||||
{
|
||||
anchors.fill: parent
|
||||
TextArea
|
||||
{
|
||||
id: readMe
|
||||
anchors.fill: parent
|
||||
readOnly: true
|
||||
wrapMode: TextArea.Wrap
|
||||
color: "darksalmon"
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
var filePath = "qrc:/README";
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open("GET", filePath, true);
|
||||
xhr.onreadystatechange = function() {
|
||||
if (xhr.readyState === XMLHttpRequest.DONE)
|
||||
{
|
||||
if (xhr.status === 200)
|
||||
{
|
||||
readMe.text = xhr.responseText;
|
||||
}
|
||||
else
|
||||
{
|
||||
readMe.text = qsTr("Datei nicht gefunden!");
|
||||
}
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user