QtCreator: Central "header" for source code (copyright, author)

Is it possible to define a central header (note) that will be included in all source code files (automatically) in QtCreator?

The title should only contain a note with legal information, copyright, the project website, etc.

I want to keep it in one central place to change it. If I manually add it to each .h/ file .cpp, I need to change it everywhere if I want to make adjustments.

+5
source share
3 answers

The closest you can do is add a license template (Options → C ++ → File Naming → License Template) as follows:

/***************************************************************************
 *                                                                         *
 *   Copyright (C) %YEAR% by CompanyName                                   *
 *                                                                         *
 *   http://CompanyName.com                                                *
 *                                                                         *
 ***************************************************************************/

, % YEAR% (, ).

, ( ).

+5

claudio. ( , )

, :

%YEAR%: Year
%MONTH%: Month
%DAY%: Day of the month
%DATE%: Date
%USER%: User name
%FILENAME%: File name
%CLASS%: Class name (if applicable)
%$VARIABLE%: Contents of environment variable VARIABLE.
+9

. .

<project_name>.pro

PRECOMPILED_HEADER = pch.h

.

... .cpp.

+3

All Articles