Load image from disk
Solved
QML and Qt Quick
-
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.
hi @qcoderpro
source : Qt.resolvedUrl("file:///C:/Users/QtCoder/Desktop/Captures/4.png")