Qt Creator Manual

Specifying Code Style Settings

Qt Creator uses the MIME type of the file to determine which mode and editor to use for opening the file. Qt Creator opens C++ files in Edit mode in the C++ code editor and QML files in the Qt Quick editor.

You can configure the code style according to your needs. You can specify code style either globally for all projects or separately for each project. To specify global code style for C++ files, select Tools > Options... > C++.

To specify global code style for QML files, select Tools > Options... > Qt Quick.

To configure the editor behavior for the current project:

  • Select Projects > Code Style Settings.
  • In the Language field, select C++ or Qt Quick.
  • Deselect the Use global settings check box.
  • In the Settings field, select Custom.
  • Specify code style settings for the project. Only General settings are available for QML files.

"Code Style Settings view"

For more information about the settings, see Indenting Code.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();