Project tree files with qmake contains function
Solved
Qt Creator and other tools
-
Hi,
i mentioned that if I add thecontains
function in the .pro file, where several header and source files are added, these files also are shown in the project tree in Qt Creator even if thecontains
function returns false.contains(DEFINES, MYCLASSES) { SOURCES += \ myclass.cpp HEADERS += \ myclass.h }
Even if MYCLASSES is not defined, the files myclass.h and myclass.cpp is still shown in the project tree. Here is a screenshot.
If I add the
message
function (not shown in the screenshot), I see that the scope isentered when the MYCLASSES is defined.I'm using Qt Creator 4.7.2 on macOS.
But why is Qt Creator still shown these files in the project tree?
Thanks
-
Hi,
Because the project view's role is to show you what's inside your project.
The fact that the files are shown doesn't mean that they are going to be compiled.