Does a Qt 5 programmer have to know about DEPENDPATH qmake variable?

心不动则不痛 提交于 2019-12-03 12:15:17
Sergey Skoblikov

If you program with Qt 5 you can safely forget that DEPENDPATH variable exists. All included files will generate dependencies for files in which they are included regardless of directories they reside.

You don't have to put up with the variable in Qt 4 too. Just add this to your .pro file:

CONFIG += depend_includepath

If you want to use DEPENDPATH variable for some reasons with Qt 5 you can switch the option off:

CONFIG -= depend_includepath

But be aware that DEPENDPATH variable behavior was changed in Qt 5 so even with the option turned off you won't get exact Qt 4 emulation.

Bottom line: forget about DEPENDPATH and don't use it.

If you can read Russian there is more info here.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!