I have a Qt project with QML files. Whenever I change these files, I have to manually right click the .qrc (resources) file and recompile it.
How do I tell visual studio to always compile a certain file, not only when it thinks it has changed?
(Here are similar questions others have asked for eclipse and flashdevelop)
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.
copy qml.qrc /B+ ,,/Y
whereqml.qrc
is the resource file name.touch.bat
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.