Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtCreator 4.4.1 not showing files from included *.PRI files
Qt 6.11 is out! See what's new in the release blog

QtCreator 4.4.1 not showing files from included *.PRI files

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gkavrecic
    wrote on last edited by
    #1

    This issue is a renewed copy of
    https://forum.qt.io/topic/37294/qtcreator-3-0-0-not-showing-files-from-included-pri-files
    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?

    J 1 Reply Last reply
    0
    • G gkavrecic

      This issue is a renewed copy of
      https://forum.qt.io/topic/37294/qtcreator-3-0-0-not-showing-files-from-included-pri-files
      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?

      J Offline
      J Offline
      jprodriguez
      wrote on last edited by jprodriguez
      #2

      Just run into the same problem. In my case the problem was that in the main .pro file I was using

      ...
      HEADERS = \
      $$PWD/Application.h

      SOURCES = \
      $$PWD/Application.cpp
      ...

      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 += \
      $$PWD/Application.h

      SOURCES += \
      $$PWD/Application.cpp
      ...

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved