[Qt-creator] indent preprocessor directives

Erik Verbruggen erik.verbruggen at me.com
Fri Apr 20 16:44:30 CEST 2012


On Apr 20, 2012, at 2:41, Mohammad Mirzadeh wrote:

> Hey guys,
> 
> Is there a way to tell QtCreator to indent directives appropriately? I don't seem to find an option under the code style ...

No, there are no options for the preprocessor directives. Qt Creator will put a # at the start of the line, which is what the C(++) standard(s) require.

> I need this for better readability of my OpenMP codes where parallel sections should be placed between codeblocks preceded by a compiler directive.

Can you give an example? I have never seen OpenMP code, so I cannot guess what "appropriate" means in that context.

-- Erik.




More information about the Qt-creator mailing list