[Interest] Qt .clang-format style

Doogster thedoogster at gmail.com
Wed May 20 18:09:21 CEST 2020


Here's my attempt at a .clang-format file that matches Qt Creator's
default, built-in "Qt" style. What do you think?

BasedOnStyle: WebKit
AllowShortIfStatementsOnASingleLine: Always
BraceWrapping:
  AfterCaseLabel:  true
  AfterClass:      true
  AfterControlStatement: true
  AfterEnum:       true
  AfterFunction:   true
  AfterNamespace:  true
  AfterObjCDeclaration: true
  AfterStruct:     true
  AfterUnion:      true
  AfterExternBlock: true
  BeforeCatch:     true
  BeforeElse:      true
  SplitEmptyFunction: false
  SplitEmptyRecord: false
  SplitEmptyNamespace: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakBeforeBraces: Custom
NamespaceIndentation: None
PointerAlignment: Right
SpaceInEmptyBlock: false


More information about the Interest mailing list