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

MCU.base in .qmlproject is not recognized

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • Some future release
    • QDS 4.2
    • MCU support
    • None
    • All

    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)) 

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thohartm Thomas Hartmann
            mikio_hirai Mikio Hirai
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes