how to display image from a folder in qml
Solved
QML and Qt Quick
-
wrote on 17 Dec 2019, 06:10 last edited by
i'm trying to display an image which is present in local folder but i'm unable to do that to display an image in qml we need to add it to resource files but here I should read a image from a local folder can someone help me on this
-
i'm trying to display an image which is present in local folder but i'm unable to do that to display an image in qml we need to add it to resource files but here I should read a image from a local folder can someone help me on this
@vamsi1992 what did you do so far ?
usually you would do it like this
Image { source: "file:///c:/path/to/my/resources/images/image.png" }
-
wrote on 17 Dec 2019, 06:16 last edited by
Image{
id:albumimg
anchors.fill:albumart
source:"//home/user/Desktop/album.png" -
wrote on 17 Dec 2019, 06:19 last edited by
Thank you @J-Hilk it worked
-
@vamsi1992
yes, add thefile:///
tag, its an actual URL when when you want to refer to a local file
4/5