[Interest] qt_add_qml_module() RESOURCES vs qt_add_resources()

ekke ekke at ekkes-corner.org
Tue Feb 13 14:40:48 CET 2024


Am 13.02.24 um 14:26 schrieb Nils Jeisecke:
> Hi Ekke,
>
> On Tue, Feb 13, 2024 at 1:41 PM ekke <ekke at ekkes-corner.org> wrote:
>> qt_add_qml_module(${MY_APP}
>>       URI Main_Module
>>       QML_FILES
>>           ${my_qml_files}
>>           ${my_js_files}
>>       SOURCES
>>           ${my_cpp_files}
>>       RESOURCES
>>           ${my_image_files}
>>           ${my_data-assets_files}
>> )
> I think you have to set RESOURCE_PREFIX if you derive from the default path.
>
> Nils

Hi Nils,

thx. But it's not the prefix. If I add images.qrc and data-assets.qrc to 
the executable, it's working.

qt_add_executable(${MY_APP}
     cpp/main.cpp
     images.qrc
     data-assets.qrc
)

So the .qrc are correct generated, but not deployed automatically, when 
RESOURCES are from qt_add_qml_module() as done using qt_add_resources().

ekke




More information about the Interest mailing list