I encountered the same problem while building qt apps using Qt Creator.(Especially while using QML files as resources.) I solved the problem using a little hack.
- Created a batch file say touch.bat in my source directory.
- This batch file contains a single line
copy qml.qrc /B+ ,,/Y
where qml.qrc
is the resource file name.
- Opened my project in QtCreator and went to Project->Build Steps->Add Build Step->Custom process step and entered
touch.bat
- Whenever the project build starts, the
qml.qrc
is touched. The build system thinks that qml.qrc is modified and builds it.
You can modify this hack for Visual Studio also.(I have not tried). Try adding touch.bat
as a build step in Visual studio. The idea is to fool the build system to think that your .qrc is modified.
I guess this is a known bug which remains unresolved. Check this bug report.
Thanks.