import QtQuick import QtQuick.Controls import QtQuick.Layouts Item { anchors.fill: parent ColumnLayout { anchors.fill: parent FontLoader { id: helloStranger source: "qrc:/fonts/HelloStranger.otf" } FontLoader { id: damarWulan source: "qrc:/fonts/Damarwulan.ttf" } FontLoader { id: hussarPrint source: "qrc:/fonts/HussarPrintA.otf" } FontLoader { id: reginaldScript source: "qrc:/fonts/ReginaldScript.ttf" } Item { height: 65 } Label { text: qsTr ("Login") font.family: helloStranger.font.family font.weight: helloStranger.font.weight font.styleName: helloStranger.font.styleName font.pixelSize: 89 font.bold: true Layout.alignment: Qt.AlignHCenter } Item { height: 25 } RowLayout { Layout.alignment: Qt.AlignHCenter spacing: 15 Label { text: qsTr ("Benutzername") minimumPixelSize: 20 Layout.preferredWidth: 150 horizontalAlignment: Text.AlignRight font.family: damarWulan.font.family font.weight: damarWulan.font.weight font.styleName: damarWulan.font.styleName font.pixelSize: 21 } TextField { id: benutzerName placeholderText: qsTr ("Benutzernamen eingeben") implicitWidth: 300 font: hussarPrint.font } } RowLayout { Layout.alignment: Qt.AlignHCenter spacing: 15 Label { minimumPixelSize: 20 Layout.preferredWidth: 150 text: qsTr ("Passwort") font.family: damarWulan.font.family font.weight: damarWulan.font.weight font.styleName: damarWulan.font.styleName font.pixelSize: 21 horizontalAlignment: Text.AlignRight } TextField { id: passwort placeholderText: qsTr ("Passwort eingeben") implicitWidth: 300 font: hussarPrint.font echoMode: TextInput.Password } } RowLayout { Layout.preferredWidth: 465 Layout.alignment: Qt.AlignHCenter Button { text: qsTr ("Feierabend für heute!") Layout.alignment: Qt.AlignRight font: reginaldScript.font onClicked: { if (benutzerName.text.trim() && passwort.text.trim()) loggedin_user.login(benutzerName.text.trim(), passwort.text) } } } Item { Layout.fillHeight: true } } Component.onCompleted: { loggedin_user.loginOkay.connect(loggedin) } function loggedin() { appLoader.source = "Dashboard.qml" } }