Why do I need to delete the build directory after changing anything in the Qt.pro file?

Every time I change something in the Qt.pro file (add a new source file, change compilation flags, etc.), my changes do not take effect. I am using Qt Creator. The same happens with windows (MSVC compiler) and Mac. If I delete the build directory then that's ok. (not counting the wasted time for a complete overhaul)

There might be a bug, but since it sounds so trivial, it rather feels like I'm missing something.

Thank!

+3


source to share


1 answer


When you change somethng in the * .pro file, you need to re-run qmake in the project to update the files in Qt Creator. You don't have to delete the build folder every time.

But when you delete the build folder, Qt automatically runs qmake on the project before starting compilation. Your solution works, but it's a bit overkill;)



qtcreator build menu

This menu is also available by right clicking on the project

+6


source







All Articles