The Projects view displays projects in a project tree. The project tree has a list of all projects open in the current session. For each project, the tree visualizes the build system structure of the project and lists all files that are part of the project.
Note: Usually, searching with the locator is the fastest way to find a particular project, file, class, or function, or almost anything else in your project.
The following image displays the Projects view in the Design mode:
You can use the project tree in the following ways:
- To open files that belong to a project, double-click them in the project tree. Files open in the appropriate editor, according to the file type. For example, code source files open in the code editor. Use the mode selector to open the current file in another editor.
- To bring up a context menu that has the actions most commonly needed, right-click an item in the project tree. For example, through the menu of the project root directory you can, among other actions, run and close the project.
- To see the absolute path of a file, move the mouse pointer over the file name.
- To move files from one project to another, drag-and-drop them in the project tree. Qt Design Studio makes the necessary changes to project configuration files.
Projects View Context Menu
The Projects view has context menus for managing projects, subprojects, folders, and files. Use the following functions to manage projects and subprojects:
- Set a project as the active project.
- Execute the Build menu commands.
- Create new files. For more information, see Adding Files to Projects.
- Rename or remove existing files. If you change the base name of a file, Qt Design Studio displays a list of other files with the same base name and offers to rename them as well. If you rename a UI file (.ui), Qt Design Studio also changes corresponding include statements accordingly.
- Search from the selected directory.
- Open a terminal window in the project directory. To specify the terminal to use on Linux and macOS, select Edit > Preferences > Environment > System.
- Open a terminal window in the project directory that you configured for building or running the project.
- Expand or collapse the tree view to show or hide all files and folders.
- Close all files in a project.
- Close the selected project or all projects except the selected one. By default, this closes all files in the projects. To keep them open, deselect the Edit > Preferences > Build & Run > General > Close source files along with project check box.
For managing files and directories, use the same functions as in the File System view. To view a project in it, select Show in File System View.
Projects View Toolbar
In the Edit and Debug mode, the sidebar has the Projects view. It has a toolbar with additional options.
To filter view contents, select (Filter Tree):
- Simplify Tree hides the categories and sorts project files alphabetically.
- Hide Generated Files hides the source files that the build system automatically generates.
- Hide Disabled Files hides the source files that you have not enabled for the current target,
- Hide Empty Directories hides directories that do not have any files.
- Show Source and Header Groups shows source and header files grouped together in the view, regardless of their location in the file system.
To stop synchronizing the position in the project tree with the file currently opened in the editor, deselect (Synchronize with Editor).
If the project is under Git version control, you can see the currently checked out branch or tag in brackets after the project name.
Available under certain Qt licenses.
Find out more.