8

I have a .pri file named Deploy.pri in my project .pro file.

Deploy.pri :

include(part1.pri)
include(part2.pri)

As you see it includes two other .pri files.

These pri files are displayed in Qt Creator project pane in the same level :

enter image description here

I want to know if there is any way to show them nested and in a hierarchical way like a tree?

Nejat
  • 31,784
  • 12
  • 106
  • 138
  • AFAIK, the included .pri just work in that way. – douyw May 12 '15 at 06:07
  • Yes I wish at-least to find a workaround for this if there is no regular solution. This is so annoying. Consider that you have a `pri` file which contains a bunch of other pri files. When you include the pri, the project pane becomes populated by many pri files. – Nejat May 12 '15 at 06:27
  • Hi Nejat, I organize my project using TEMPLATE = subdirs until the last pro/pri file where I have my sources. This works well, I have a perfect tree with Qt creator but you have to create your folders with your pro/pri files in the appropriate location. – Martin May 12 '15 at 08:07
  • @Martin I am afraid the `subdirs` template does not solve this problem. That's for the purpose of organizing project with sub projects. When you include such a pri file in one of the subprojects, again all of them are displayed in the same level. – Nejat May 12 '15 at 08:16
  • Starting from Qt Creator 3.6 nested .pri files are shown in a tree: https://bugreports.qt.io/browse/QTCREATORBUG-487 – Nejat Apr 05 '16 at 07:02

1 Answers1

0

First nest your modules into subdirs.

TEMPLATE = subdirs
SUBDIRS += project1 \
           project2

Then include part1.pri and part2.pri using ../ depending on the depth of your subdirectories like this include(../part1.pri)

techneaz
  • 998
  • 6
  • 9
  • It's obvious that `subdirs` projects are displayed in a hierarchical way. My question is how to show nested `.pri` files in a single `.pro` file. i.e how to show them hierarchical when you include one `.pri` file in another one. – Nejat Jul 09 '15 at 03:23