Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
QDS 4.2
-
None
Description
I'm using QDS 4.2.
The attached project has CoffeMaker.qmlproject, which has this line in line 62.
MCU.base: "resources"
This allows the developer to omit the part of the image paths in the code, for example, if the image file is specified like this in .qmlproject:
ImageFiles { files: [ "resources/main-bg.png" ] MCU.base = "resoureces" }
Then you can use main-bg.png without having "resoureces" prepended.
Image {
source : "main-bg.png"
}
Now, in the line 11 of CoffeeSelectionButton.qml, the image file name is obtained from the function HelperFunctions.getCoffeeSelectionButtonImage().
The image name is then assigned to itemImage, which is assigned to the source property of the Image.
The issue is, the assigned value is the file name, such as "CaffeLatte.png," which should be treated as if it's under "resources" folder(because of MCU.base : "resoureces"), but the QDS seems to just ignore the base path specified in .qmlproject, which is obvious in this Application Output below.
The correct image paths should have "resources" folder before the name of the image in the path but any of them in the output doesn't have it. (for example, file:///C:/work/MCU_Training_Material/CoffeMaker/resoureces/CaffeLatte.png is the correct one I want to see in this case)
Warning: file:///C:/work/MCU_Training_Material/CoffeMaker/CoffeeSelectionButton.qml:16:5: QML Image: Cannot open: file:///C:/work/MCU_Training_Material/CoffeMaker/CaffeLatte.png (file:///C:/work/MCU_Training_Material/CoffeMaker/CoffeeSelectionButton.qml:16, (null)) Warning: file:///C:/work/MCU_Training_Material/CoffeMaker/CoffeeSelectionButton.qml:16:5: QML Image: Cannot open: file:///C:/work/MCU_Training_Material/CoffeMaker/CaffeLatte.png (file:///C:/work/MCU_Training_Material/CoffeMaker/CoffeeSelectionButton.qml:16, (null)) Warning: file:///C:/work/MCU_Training_Material/CoffeMaker/CoffeeSelectionButton.qml:16:5: QML Image: Cannot open: file:///C:/work/MCU_Training_Material/CoffeMaker/CaffeLatte.png (file:///C:/work/MCU_Training_Material/CoffeMaker/CoffeeSelectionButton.qml:16, (null))