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
Window {
width: 640
height: 480
width: 720
height: 420
visible: true
title: qsTr("Mein Navidrome Client")
title: "Navidrome Client"
Column {
anchors.centerIn: parent
spacing: 20
spacing: 12
width: parent.width * 0.75
Text {
text: "Hallo Navidrome!"
font.pixelSize: 24
anchors.horizontalCenter: parent.horizontalCenter
TextField {
id: hostField
placeholderText: "Host, z.B. https://navidrome.example.de"
text: "https://navidrome.timvandenboom.eth64.de"
}
TextField {
id: userField
placeholderText: "User"
text: "nils"
}
TextField {
id: passField
placeholderText: "Passwort"
echoMode: TextInput.Password
}
Button {
text: "Klick mich"
anchors.horizontalCenter: parent.horizontalCenter
onClicked: console.log("Button gedrückt!")
text: "Verbindung testen (ping)"
onClicked: apiClient.ping(hostField.text, userField.text, passField.text)
}
Label {
text: apiClient.lastStatus
wrapMode: Text.WordWrap
}
}
Connections {
target: apiClient
function onPingFinished(ok, message) {
console.log("pingFinished:", ok, message)
}
}
}