问题描述
是否可以使用项目包含文件 (.pri) 显示不止一个额外级别.例如,如果 .pro
文件包含 .pri
文件,该文件包含两个 .pri
文件.
Is it possible to display more then only one extra level using project include files (.pri).For example if .pro
file includes .pri
file which includes two .pri
files.
- .pro
- .pri
- .pri
- .pri
在 QtCreator (Projects) 中的显示具有误导性:
In QtCreator (Projects) display is misleading:
- .pro
- .pri
- .pri
- .pri
它根本不考虑
.pri
文件在文件系统中的位置,而是将它们显示为相同的.pro
级别.还是我做错了什么或只是期望太多?我正在使用Qt 4.7.4
和QtCreator 2.2.1
.It simply doesn't respect where the
.pri
file is in the file system and displays them as a at the same.pro
level. Or am I doing something wrong or just expecting to much? I am usingQt 4.7.4
andQtCreator 2.2.1
.推荐答案
如果您忽略第二级 .pri 文件并仅使用新目录并将所有包含移动到根 .pri 文件,似乎有某种解决方法.例如:
Seems like there is some kind of workaround if you ignore the second level of .pri files and just use a new directory and move all includes to root .pri file. For example:
- .pro
- .pri
- 新目录 A(而不是另一个 .pri)
- 新目录 B(而不是另一个 .pri)
QtCreator(项目)显示:
QtCreator (Projects) display:
- .pro
- .pri
- 标题
- 新目录A
- 新目录 B
- 新目录A
- 新目录 B
这样做的好处是您可以保持相同的文件结构.我仍然希望他们能够检测 .pri 的新级别.但是,如果您发现更多我不知道的东西,请告诉我.
Good thing about it is that you get to keep the same file structure. I am still hoping they implement detection of new level(s) of .pri. But please let me know if you find out something more that I heaven't.
这篇关于在 QtCreator 中使用 .pro 和 .pri 正确(树)显示 Qt 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
- 标题
- .pri
- .pri
- .pri