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. For more information, see Creating Files and Directories from Locator. 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.

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 Designer forms and a matching classes for Qt Widgets projects, Qt resource files, as well as QML and JavaScript files for Qt Quick projects.
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).
Nim (experimental)Empty Nim source and script files.

See also Create C++ classes, Create OpenGL fragment and vertex shaders, Create resource files, and Use project wizards.

© 2023 The Qt Company Ltd. 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.