ping boxen

This commit is contained in:
2026-01-03 16:19:48 +01:00
parent db4a6d4e22
commit 72366b3d5d
+33 -11
View File
@@ -2,25 +2,47 @@ import QtQuick
import QtQuick.Controls import QtQuick.Controls
Window { Window {
width: 640 width: 720
height: 480 height: 420
visible: true visible: true
title: qsTr("Mein Navidrome Client") title: "Navidrome Client"
Column { Column {
anchors.centerIn: parent anchors.centerIn: parent
spacing: 20 spacing: 12
width: parent.width * 0.75
Text { TextField {
text: "Hallo Navidrome!" id: hostField
font.pixelSize: 24 placeholderText: "Host, z.B. https://navidrome.example.de"
anchors.horizontalCenter: parent.horizontalCenter text: "https://navidrome.timvandenboom.eth64.de"
}
TextField {
id: userField
placeholderText: "User"
text: "nils"
}
TextField {
id: passField
placeholderText: "Passwort"
echoMode: TextInput.Password
} }
Button { Button {
text: "Klick mich" text: "Verbindung testen (ping)"
anchors.horizontalCenter: parent.horizontalCenter onClicked: apiClient.ping(hostField.text, userField.text, passField.text)
onClicked: console.log("Button gedrückt!") }
Label {
text: apiClient.lastStatus
wrapMode: Text.WordWrap
}
}
Connections {
target: apiClient
function onPingFinished(ok, message) {
console.log("pingFinished:", ok, message)
} }
} }
} }