Create files

Use wizard templates to add individual files to your projects.

To add files to projects, select File > New File, and then select the type of the file.

{New File wizard}

Note: You can also use the f locator filter to create a new file and open it in the editor. However, you must manually add the created file to a project.

Select file type

The following table lists the types of wizard templates that you can use for creating files. The New File dialog shows detailed information about each file wizard template.

CategoryPurpose
C/C++Header and source files for new classes.
ModelingState Chart XML (SCXML) files, Universal Modeling Language (UML) style models, and scratch models that use a temporary file.
QtSource and header files for item, table, or list models, Qt Widgets Designer forms and a matching classes for Qt Widgets projects, Qt resource and translation files, as well as QML and JavaScript files for Qt Quick projects.
Compiler ExplorerExample setup for using Compiler Explorer to compile C++ or Python code.
GLSLOpenGL fragment and vertex shaders.
GeneralMarkdown files, empty files that you can save with any filename extension, and scratch buffers that use temporary files.
JavaClass files.
PythonClass and script files for Python projects.
vcpkg (experimental)vcpkg package manager manifest files (vcpkg.json).
Test CaseTest framework specific file holding a new test case, to be added to projects already using a test framework.
Nim (experimental)Empty Nim source and script files.

See also Navigate with locator, How To: Add Files, Add tests to existing test projects, Create UML-style models, and Use project wizards.

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.