Add files to projects

To create a file in the current project directory, select or create a preset for a particular file type:

  1. Go to Command Palette, and then select Qt: Create New File.
  2. In New File, enter a name for the file.

    {New File dialog}

  3. In Terminal, select a preset or Manually select features to create your own preset.

    {Pick a preset in Terminal}

  4. Select a CMake kit for the project.

File presets

Select one of the following file presets:

  • [Default] @types/qml creates a QML file (.qml).
  • [Default] @types/qrc creates a Qt resource file (.qrc).
  • [Default] @types/ts creates a translation file (.ts).
  • [Default] @types/ui creates a Qt Widgets form file (.ui).
  • [Manually select features] creates a new preset with the default values you select.

See also Tutorial: Qt Widgets application and Create Qt projects.

© 2024 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.