Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
QDS 2.1 Beta2
Description
Steps to reproduce:
- Create a Qt for MCUs project
- Import some design with Qt Bridge
- Compile the resulting application with Qt for MCUs
Expected result:
The application compiles successfully and runs without manual changes
Actual result:
Build fails with errors about assets not being found in the resource system. For example:
C:/dev/tmp/MCUBridgeImport/MCU Fitness Demo Refresh 800/Elevation800.ui.qml:12:9: error: Failed to find image in the resource system
source: "assets/elevation800.png"
^~~~~~
This is because QML files in Qt for MCUs are not part of the resource system and therefore cannot refer to assets using a path relative to the QML file. The base path of all assets is set by default to the project root folder, which means that in the example producing the error above, the image would only be accessible with the path "MCU Fitness Demo Refresh 800/assets/elevation800.png". Manually setting the BASE argument of qul_add_resource to "MCU Fitness Demo Refresh 800" in the CMakeLists.txt fixes the problem.
Note that this happens whether the "Create sub directory for each metadata" checkbox is enabled or not, since the importer puts the imported assets in a subdirectory by default in any case.
Attachments
Issue Links
- is duplicated by
-
QDS-4353 MCU: import from Qt Bridge into root of project
- Closed