I've an image, gps.png, that is included in a resource.
The image is in the resources/images/ directory.
The resource file has this entry:
<qresource prefix="/images">
<file alias="gps">resources/images/gps.png</file>
</qresource>
<qresource prefix="/images">
<file alias="gps">resources/images/gps.png</file>
</qresource>
To copy to clipboard, switch view to plain text mode
On qml, has this code:
Image {
width: 64
height: 64
source: "images/gps"
}
Image {
width: 64
height: 64
source: "images/gps"
}
To copy to clipboard, switch view to plain text mode
If I run this program, it works well, the image appears, but if I run qmlscene, nothing appears, it doesn't find the image. Only appears when I put the complete path: resources/images/gps.png.
How can I prototype using qmlscene when use resources?
Bookmarks