Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-4078

MCU project fails to build when importing with the Bridge in subfolders

    XMLWordPrintable

Details

    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

          Activity

            People

              algerman Aleksei German
              ylopes Yoann Lopes
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: