Add a license header template for C++ code

Specify a file that has a license header for C++ in Preferences > C++ > File Naming > License template.

"File Naming preferences"

The license file may have special placeholders enclosed in %% that are replaced when generating a new file:

  1. %YEAR%: Year
  2. %MONTH%: Month
  3. %DAY%: Day of the month
  4. %DATE%: Date
  5. %USER%: Username
  6. %FILENAME%: File name
  7. %CLASS%: Class name (if applicable)
  8. %$VARIABLE%: Contents of environment variable VARIABLE.

In addition, placeholders in the form %{..} are replaced by the value of the corresponding Qt Creator variable.

See also Use Qt Creator variables.