Project tree files with qmake contains function
-
Hi,
i mentioned that if I add thecontainsfunction 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 thecontainsfunction 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
messagefunction (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.
-
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.