Load image from disk
-
wrote on 6 Feb 2021, 12:46 last edited by
Hi all,
I want to load an image I have on my hard disk for the item Image as follows, instead of the .qrc directory:
Image { id: myImage source: "C:/Users/QtCoder/Desktop/Captures/4.png" anchors.fill: parent }
But the image (4.png) is not shown when the project runs.
-
Hi all,
I want to load an image I have on my hard disk for the item Image as follows, instead of the .qrc directory:
Image { id: myImage source: "C:/Users/QtCoder/Desktop/Captures/4.png" anchors.fill: parent }
But the image (4.png) is not shown when the project runs.
wrote on 6 Feb 2021, 13:03 last edited byhi @qcoderpro
source : Qt.resolvedUrl("file:///C:/Users/QtCoder/Desktop/Captures/4.png")
1/2