Qt 6.11 is out! See what's new in the release
blog
How do I dynamically display an image when I have a python backend?
-
main.qml
Connections { target: backend function onGetVideoThumbnail(thumbnail_url) { ttext.source = thumbnail_url } } GridView { id: gridView anchors.fill: parent anchors.rightMargin: 10 anchors.leftMargin: 10 anchors.bottomMargin: 10 anchors.topMargin: 10 model: ListModel { Component.onCompleted: { for (var i = 0; i < 4; i++) { append(createListElement()); } } function createListElement() { return { name: "Green", colorCode: "green" }; } } cellWidth: 100 delegate: Item { x: 5 height: 50 Column { Text { id: ttext text: "H" color: "#ffffff" } spacing: 5 } } cellHeight: 70 }My script is able to send and array of image url to the backend but I'm unable to assign the array of image to dynamically display the image. How do I do this?