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

Resources should be be automatically added to qt_qml_add_resources() in the generated CMakeLists.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • Some future release
    • QDS 4.6.0
    • CMake exporter
    • None
    • Windows

    Description

      <Summary>
      The used assers such as image, font, sound files should be automatically registered to the Qt resource system by being added to the qt_add_qml_module().

      <Environment>
      1. Windows 11 host

      2. QDS 4.6.0
      3. Qt 6.8.0

      <Reproduction Steps>
      1. Clone the code from here: https://git.qt.io/mikio_hirai/qtmultimediastudy/-/commit/96bab0c9a93e4629f594e437e701f1d0487dc180

      2. Run the applicatoin on Qt Creator with Qt 6.8.0 (I used msvc kit)

      3. You see the error "QSoundEffect(qaudio): Error decoding source qrc:/qt/qml/QtMMContent/test.wav"

      <Explanation>
      The project above uses "test.wav" in the line 35 of Screen01.ui.qml, which plays on QDS because QtMM.qmlproject catches it with Files on line 81. 
      However on Qt Creator, the application shows a runtime error below:

      QSoundEffect(qaudio): Error decoding source qrc:/qt/qml/QtMMContent/test.wav 

      I added a function listResources() in main.cpp which outputs the registered resources, in which test.wav is not included. 
      With current situation, users must manually edit the CMakeLists.txt to add the resources, which is tideous. Also, it may causes overwrites to the manually edited CMakeLists.txt by QDS, which leads to frustration.

      <Suggestion>
      QDS should automatically pick up the resources and register them to the qt_add_qml_module() of the corresponding QML module in the CMakeLists.txt while generating CMakeLists.txt

       

      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:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes