admin管理员组文章数量:1332865
Is it possible to make Qt Creator
to show only project files without their subfolders in the Projects
tree view? I'm curious about CMake
projects.
Given the following project structure on a disk:
test_project/
├CMakeLists.txt
└src/
├test/
│├test.cpp
│└test.h
└main.cpp
Given an excerpt of CMakeLists.txt
for anising the project structure in Qt Creator
Projects
view:
project(proj_tree LANGUAGES CXX)
set(HDR src/test/test.h)
set(SRC src/main.cpp src/test/test.cpp)
source_group("Sources" FILES ${SRC})
source_group("Headers" FILES ${HDR})
add_executable(proj_tree ${SRC} ${HDR})
Here is how Qt Creator
displays the project:
proj_tree/
├CMakeLists.txt
└proj_tree/
├Headers/
│└src/
│ └test/
│ └test.h
└Sources/
└src/
├test/
│└test.cpp
└main.cpp
What I'd like it to look like:
proj_tree/
├CMakeLists.txt
└proj_tree/
├Headers/
│└test.h
└Sources/
├test.cpp
└main.cpp
I tried playing with source_group(TREE …)
, full and relative file paths, using file base names only… But without luck.
P.S.: I've seen this thread which is quite old now (maybe something has changed since then) and not about a CMake
project.
本文标签: Hiding Subfolders in Qt Creator Project Tree View for CMake ProjectStack Overflow
版权声明:本文标题:Hiding Subfolders in Qt Creator Project Tree View for CMake Project - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742292787a2448125.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论