Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
4.8.0
-
None
-
windows xp sp3, mingw gcc 4.6.1
Description
I made a "Test" component for QML, in a subdirectory named "aaa",
which is an "Image" as root element. I made it change the source
property of the image on click.
I put two image files in the "aaa" subdirectory, named "img1.png" and "img2.png".
On my main.qml file, I used a "Test" component, and defined it's two properties:
source: "...path to normal image"
alt: "...path to image when clicked"
The problem is that using relative paths for source / alt properties, in order
to make it work I need to specify two different paths, like that:
source: "aaa/img1.png"
alt: "img2.png"
If I make like that:
alt: "aaa/img2.png"
file is not found, as it is searched in:
"...path to my project.../aaa/aaa/img2.png"
I would expect a consitent behaviour, either like:
source: "img1.png"
alt: "img2.png"
("Test" item source directory is always current directory)
or:
source: "aaa/img1.png"
alt: "aaa/img2.png"
(parent item source directory is always current directory)
The latter seems to me more correct.