CoverAction { iconSource: "image://theme/icon-cover-location" onTriggered: getData(); function getData(url) { var xhttp = new XMLHttpRequest(); var url = "http://192.168.1.201/cm?cmnd=rfkey1" xhttp.onreadystatechange=function() { if (xhttp.readyState == XMLHttpRequest.DONE) { console.log(xhttp.responseText); mainText.text = xhttp.responseText; } }; xhttp.open("GET", url); xhttp.send(); } } } Label { text: "" id: mainText x: Theme.paddingMedium horizontalAlignment: Text.AlignHCenter font.pixelSize: Theme.fontSizeExtraSmall width: parent.width -x*2 anchors { bottom: cover.bottom bottomMargin: Theme.paddingLarge*4 horizontalCenter: parent.horizontalCenter } Timer { interval: 5000; running: true; onTriggered: mainText.opacity = 0.0; } }