Resource compilation not called by qmake

Is there a way to automatically start recompiling resource files if some of the source resource files (icons, text files, etc.) are changed?

eg. if I have a .pro file with

RESOURCES = something.qrc 

and in the something.qrc file I have something like

  <RCC> <qresource prefix="/localfile"> <file>shaders/mytextfile.fs</file> </qresource> </RCC> 

If I modify the mytextfile.fs file, the generation of the qrc_something.cpp file does not start.

+6
qt resources qmake
source share
2 answers

You can try adding the DEPENDPATH variable to your .pro:

 DEPENDPATH += ./path_to_my_qrc_files 

He tells QMake where to look for dependencies. It works for header files, I don't know the resources. It might be worth a try.

+6
source share

The question is misleading.

Changes to the files mentioned in the resource file initiate the regeneration of the qrc_something.cpp file.

I checked it myself. It just works without having to edit the .pro file.

0
source share

All Articles