为 C++ 代码添加许可证头模板

首选项>C++ >File Naming >License template 中指定一个包含 C++ 许可证头文件的文件。

C++ 首选项中的文件命名选项卡

许可证文件可能有特殊的占位符,这些占位符用%% 括起来,在生成新文件时会被替换:

  1. %YEAR%:年份
  2. %MONTH%:月
  3. %DAY%:月日
  4. %DATE%:日期
  5. %USER%:用户名
  6. %FILENAME%:文件名
  7. %CLASS%:类名(如适用)
  8. %$VARIABLE%:环境变量VARIABLE 的内容。

此外,%{...} 形式的占位符将被相应Qt Creator 变量的值替换。

另请参阅 使用Qt Creator 变量

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.