I would like to divide my Qt project into several directories because it is growing pretty large. However, when I click on browse in QtCreator, there is no 'Add directory' and no such thing in 'Add new'. Can this be done somehow?
相关问题
- QML: Cannot read property 'xxx' of undefin
- QTextEdit.find() doesn't work in Python
- QT Layouts, how to make widgets in horizontal layo
- QT GUI freezes even though Im running in separate
- QGraphicsView / QGraphicsScene size matching
相关文章
- ubuntu20.4中c#通过c++库调用python脚本
- Qt槽函数自动执行多遍
- Is there a non-java, cross platform way to launch
- How to get a settings storage path in a cross-plat
- Why doesn't valgrind detect a memory leak in m
- QTreeView remove decoration/expand button for all
- qt界面拥挤
- how do I correctly return values from pyqt to Java
You can create a sub-directory as long as you have a file you wish to create in it. Go to the parent directory, and "Add" a file to it. "Browse" for the location and create a new folder inside the browse window. Agreed, that is not quite intuitive.
When you create a new Class in your Qt-Project, you can choose the path in this wizard and hereby specify new folders like DAL, BO, UI, ...
When my 'data' directory only had one sub-directory 'model' it just appeared as "data/model". After adding 'dao' as another sub-directory it displayed data with the traditional +/- manner to reveal model and dao.
Answer : How to create a folder or a subdirectory for a project in QtCreator?
Prior to QT Creator 3.1.x, you can right-click on your project -> "add new..." and change the path to the folder you want.
Be careful the folder must exist, Qt will not create it for you.
Qt takes care of the path in your .pro file.
That's it !
One method you could use is to add a project include file for each sub directory.
Qt Creator displays these in the GUI in a nested fashion, and allows you to add files to them.
e.g.
in project.pro
in folder1/include.pri
etc
Starting from version 1.2.90 Qt Creator shows subfolders which exist in project's folder as branches in project's tree if only Filter tree option is not set to Simplify tree.