QtCreator 4.4.1 not showing files from included *.PRI files
This issue is a renewed copy of
But as there was no suitable answer, I+m retrying my luck.
Started to use Qt5.9 and tried to compile an old 4.8 project.
In the Project View the included files are not shown for any included *.PRI file.
I use a common library folder with several *.PRI files.
Currently, the files have the below structure and compile fine in Qt4.8:
INCLUDEPATH += $$PWD DEPENDPATH += $$PWD HEADERS += indea_system.h SOURCES += indea_system.cpp
However, compiling the project in Qt5.9 it reports that in can't find indea_system.* files.
I've tried to remove the DEPENDPATH, as its behvaiour changed in Qt5. Didn't helped.
Finally, the *.PRI file modified to show files in QtCreator 4.4 is as below:
INCLUDEPATH += $$PWD HEADERS += $$PWD/indea_system.h SOURCES += $$PWD/indea_system.cpp
But I find this wrong.
Why do I have to always attach $$PWD path as I already said where to include files from?
The first (or old) implementation in 4.8 seems much more neat to me.
Specially, if you have several files to include in the *.PRI
Can somebody explain me why this has changed?
Do I miss something?
Is there a way to keep the HEADERS/SOURCES list neat as in 4.8?
Just run into the same problem. In my case the problem was that in the main .pro file I was using
HEADERS = \
SOURCES = \
This was clearing any previous content of SOURCES and HEADERS and as a conesquence there was no included source file seen in the project tree in qtcreator
In my case the solution was to add the '+' before the '=' -> change to
HEADERS += \
SOURCES += \