如何将整个目录添加到 QT Creator 项目中 [英] How do I add an entire directory to a QT creator project

查看:51
本文介绍了如何将整个目录添加到 QT Creator 项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个现有的 QT Creator 项目.我想将整个目录添加到这个项目中.我看到我可以右键单击项目文件浏览器树和添加现有文件..."但是通过这个对话框,我只能添加单个文件.如何包含整个目录?

I have an existing QT Creator project. I want to add an entire directory to this project. I see that I can right click in the project file browser tree and "Add Existing Files..." However through this dialog box, I can only add individual files. How can I include an entire directory?

推荐答案

最简单的方法是直接编辑你的.pro文件,添加HEADERS += mydir/*.hSOURCES+= mydir/*.cpp 并且整个目录的内容将显示在 QT Creator 中.进一步参考:http://qt-project.org/doc/qt-5/qmake-project-files.html

The simplest way is to directly edit your .pro file, add HEADERS += mydir/*.h and SOURCES += mydir/*.cpp and the contents of the whole directory will show up in QT Creator. Further reference: http://qt-project.org/doc/qt-5/qmake-project-files.html

这篇关于如何将整个目录添加到 QT Creator 项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆