Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator 16 displays indentation incorrectly

Qt Creator 16 displays indentation incorrectly

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
11 Posts 5 Posters 170 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R ronperek

    Recently I noticed that indentation in my project was broken. Realized that the file has not changed, but it's only the Qt Creator that displays it differently. Not 100% sure, but I think it happened in version 16.

    Piece of code:

    	uint32_t	analogOutput___source	[ANALOG_OUTPUT_COUNT];
    	float		analogOutput___rangeMin	[ANALOG_OUTPUT_COUNT];
    	float		analogOutput___rangeMax	[ANALOG_OUTPUT_COUNT];
    

    How it is displayed correctly in xed (and previously in Qt Creator):
    xed.png

    How it is displayed now in Qt Creator:
    qtcreator.png

    Is there some option I can change to get back to the previous display, or do I need to wait for a fix?

    JonBJ Offline
    JonBJ Offline
    JonB
    wrote last edited by
    #2

    @ronperek
    It may be a genuine problem in Creator 16, but have a read through recent https://forum.qt.io/topic/161687/indentation-issue-on-qt-creator. There were still some unanswered questions at the end of that?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      ronperek
      wrote last edited by
      #3

      I saw that thread, but found nothing useful to solve my problem in it.

      My settings:
      2025-04-24_13-53.png

      Clang settings:

      ---
      Language:        Cpp
      AccessModifierOffset: -4
      AlignAfterOpenBracket: Align
      AlignArrayOfStructures: None
      AlignConsecutiveAssignments:
        Enabled:         false
        AcrossEmptyLines: false
        AcrossComments:  false
        AlignCompound:   false
        PadOperators:    true
      AlignConsecutiveBitFields:
        Enabled:         false
        AcrossEmptyLines: false
        AcrossComments:  false
        AlignCompound:   false
        PadOperators:    true
      AlignConsecutiveDeclarations:
        Enabled:         false
        AcrossEmptyLines: false
        AcrossComments:  false
        AlignCompound:   false
        PadOperators:    true
      AlignConsecutiveMacros:
        Enabled:         false
        AcrossEmptyLines: false
        AcrossComments:  false
        AlignCompound:   false
        PadOperators:    true
      AlignEscapedNewlines: DontAlign
      AlignOperands:   Align
      AlignTrailingComments:
        Kind:            Always
        OverEmptyLines:  0
      AllowAllArgumentsOnNextLine: true
      AllowAllParametersOfDeclarationOnNextLine: true
      AllowShortBlocksOnASingleLine: Never
      AllowShortCaseLabelsOnASingleLine: false
      AllowShortEnumsOnASingleLine: true
      AllowShortFunctionsOnASingleLine: Inline
      AllowShortIfStatementsOnASingleLine: Never
      AllowShortLambdasOnASingleLine: All
      AllowShortLoopsOnASingleLine: false
      AlwaysBreakAfterDefinitionReturnType: None
      AlwaysBreakAfterReturnType: None
      AlwaysBreakBeforeMultilineStrings: false
      AlwaysBreakTemplateDeclarations: Yes
      AttributeMacros:
        - __capability
      BinPackArguments: false
      BinPackParameters: false
      BitFieldColonSpacing: Both
      BraceWrapping:
        AfterCaseLabel:  false
        AfterClass:      true
        AfterControlStatement: Never
        AfterEnum:       false
        AfterExternBlock: false
        AfterFunction:   true
        AfterNamespace:  false
        AfterObjCDeclaration: false
        AfterStruct:     true
        AfterUnion:      false
        BeforeCatch:     false
        BeforeElse:      false
        BeforeLambdaBody: false
        BeforeWhile:     false
        IndentBraces:    false
        SplitEmptyFunction: false
        SplitEmptyRecord: false
        SplitEmptyNamespace: false
      BreakAfterAttributes: Never
      BreakAfterJavaFieldAnnotations: false
      BreakArrays:     true
      BreakBeforeBinaryOperators: All
      BreakBeforeConceptDeclarations: Always
      BreakBeforeBraces: Custom
      BreakBeforeInlineASMColon: OnlyMultiline
      BreakBeforeTernaryOperators: true
      BreakConstructorInitializers: BeforeComma
      BreakInheritanceList: BeforeColon
      BreakStringLiterals: true
      ColumnLimit:     100
      CommentPragmas:  '^ IWYU pragma:'
      CompactNamespaces: false
      ConstructorInitializerIndentWidth: 4
      ContinuationIndentWidth: 4
      Cpp11BracedListStyle: true
      DerivePointerAlignment: false
      DisableFormat:   false
      EmptyLineAfterAccessModifier: Never
      EmptyLineBeforeAccessModifier: LogicalBlock
      ExperimentalAutoDetectBinPacking: false
      FixNamespaceComments: true
      ForEachMacros:
        - forever
        - foreach
        - Q_FOREACH
        - BOOST_FOREACH
      IfMacros:
        - KJ_IF_MAYBE
      IncludeBlocks:   Preserve
      IncludeCategories:
        - Regex:           '^"(llvm|llvm-c|clang|clang-c)/'
          Priority:        2
          SortPriority:    0
          CaseSensitive:   false
        - Regex:           '^(<|"(gtest|gmock|isl|json)/)'
          Priority:        3
          SortPriority:    0
          CaseSensitive:   false
        - Regex:           '.*'
          Priority:        1
          SortPriority:    0
          CaseSensitive:   false
      IncludeIsMainRegex: '(Test)?$'
      IncludeIsMainSourceRegex: ''
      IndentAccessModifiers: false
      IndentCaseBlocks: false
      IndentCaseLabels: false
      IndentExternBlock: AfterExternBlock
      IndentGotoLabels: true
      IndentPPDirectives: None
      IndentRequiresClause: true
      IndentWidth:     4
      IndentWrappedFunctionNames: false
      InsertBraces:    false
      InsertNewlineAtEOF: false
      InsertTrailingCommas: None
      IntegerLiteralSeparator:
        Binary:          0
        Decimal:         0
        Hex:             0
      JavaScriptQuotes: Leave
      JavaScriptWrapImports: true
      KeepEmptyLinesAtTheStartOfBlocks: false
      LambdaBodyIndentation: Signature
      LineEnding:      DeriveLF
      MacroBlockBegin: ''
      MacroBlockEnd:   ''
      MaxEmptyLinesToKeep: 1
      NamespaceIndentation: None
      ObjCBinPackProtocolList: Auto
      ObjCBlockIndentWidth: 4
      ObjCBreakBeforeNestedBlockParam: true
      ObjCSpaceAfterProperty: false
      ObjCSpaceBeforeProtocolList: true
      PackConstructorInitializers: BinPack
      PenaltyBreakAssignment: 150
      PenaltyBreakBeforeFirstCallParameter: 300
      PenaltyBreakComment: 500
      PenaltyBreakFirstLessLess: 400
      PenaltyBreakOpenParenthesis: 0
      PenaltyBreakString: 600
      PenaltyBreakTemplateDeclaration: 10
      PenaltyExcessCharacter: 50
      PenaltyIndentedWhitespace: 0
      PenaltyReturnTypeOnItsOwnLine: 300
      PointerAlignment: Right
      PPIndentWidth:   -1
      QualifierAlignment: Leave
      ReferenceAlignment: Pointer
      ReflowComments:  false
      RemoveBracesLLVM: false
      RemoveSemicolon: false
      RequiresClausePosition: OwnLine
      RequiresExpressionIndentation: OuterScope
      SeparateDefinitionBlocks: Leave
      ShortNamespaceLines: 1
      SortIncludes:    CaseSensitive
      SortJavaStaticImport: Before
      SortUsingDeclarations: LexicographicNumeric
      SpaceAfterCStyleCast: true
      SpaceAfterLogicalNot: false
      SpaceAfterTemplateKeyword: false
      SpaceAroundPointerQualifiers: Default
      SpaceBeforeAssignmentOperators: true
      SpaceBeforeCaseColon: false
      SpaceBeforeCpp11BracedList: false
      SpaceBeforeCtorInitializerColon: true
      SpaceBeforeInheritanceColon: true
      SpaceBeforeParens: ControlStatements
      SpaceBeforeParensOptions:
        AfterControlStatements: true
        AfterForeachMacros: true
        AfterFunctionDefinitionName: false
        AfterFunctionDeclarationName: false
        AfterIfMacros:   true
        AfterOverloadedOperator: false
        AfterRequiresInClause: false
        AfterRequiresInExpression: false
        BeforeNonEmptyParentheses: false
      SpaceBeforeRangeBasedForLoopColon: true
      SpaceBeforeSquareBrackets: false
      SpaceInEmptyBlock: false
      SpaceInEmptyParentheses: false
      SpacesBeforeTrailingComments: 1
      SpacesInAngles:  Never
      SpacesInConditionalStatement: false
      SpacesInContainerLiterals: false
      SpacesInCStyleCastParentheses: false
      SpacesInLineCommentPrefix:
        Minimum:         1
        Maximum:         -1
      SpacesInParentheses: false
      SpacesInSquareBrackets: false
      Standard:        Auto
      StatementAttributeLikeMacros:
        - Q_EMIT
      StatementMacros:
        - Q_UNUSED
        - QT_REQUIRE_VERSION
        - Q_CLASSINFO
        - Q_ENUM
        - Q_ENUM_NS
        - Q_FLAG
        - Q_FLAG_NS
        - Q_GADGET
        - Q_GADGET_EXPORT
        - Q_INTERFACES
        - Q_MOC_INCLUDE
        - Q_NAMESPACE
        - Q_NAMESPACE_EXPORT
        - Q_OBJECT
        - Q_PROPERTY
        - Q_REVISION
        - Q_DISABLE_COPY
        - Q_SET_OBJECT_NAME
        - QT_BEGIN_NAMESPACE
        - QT_END_NAMESPACE
        - QML_ADDED_IN_MINOR_VERSION
        - QML_ANONYMOUS
        - QML_ATTACHED
        - QML_DECLARE_TYPE
        - QML_DECLARE_TYPEINFO
        - QML_ELEMENT
        - QML_EXTENDED
        - QML_EXTENDED_NAMESPACE
        - QML_EXTRA_VERSION
        - QML_FOREIGN
        - QML_FOREIGN_NAMESPACE
        - QML_IMPLEMENTS_INTERFACES
        - QML_INTERFACE
        - QML_NAMED_ELEMENT
        - QML_REMOVED_IN_MINOR_VERSION
        - QML_SINGLETON
        - QML_UNAVAILABLE
        - QML_UNCREATABLE
        - QML_VALUE_TYPE
      TabWidth:        4
      UseTab:          Always
      WhitespaceSensitiveMacros:
        - BOOST_PP_STRINGIZE
        - CF_SWIFT_NAME
        - NS_SWIFT_NAME
        - PP_STRINGIZE
        - STRINGIZE
      ...
      
      
      JonBJ JoeCFDJ 2 Replies Last reply
      0
      • R ronperek

        I saw that thread, but found nothing useful to solve my problem in it.

        My settings:
        2025-04-24_13-53.png

        Clang settings:

        ---
        Language:        Cpp
        AccessModifierOffset: -4
        AlignAfterOpenBracket: Align
        AlignArrayOfStructures: None
        AlignConsecutiveAssignments:
          Enabled:         false
          AcrossEmptyLines: false
          AcrossComments:  false
          AlignCompound:   false
          PadOperators:    true
        AlignConsecutiveBitFields:
          Enabled:         false
          AcrossEmptyLines: false
          AcrossComments:  false
          AlignCompound:   false
          PadOperators:    true
        AlignConsecutiveDeclarations:
          Enabled:         false
          AcrossEmptyLines: false
          AcrossComments:  false
          AlignCompound:   false
          PadOperators:    true
        AlignConsecutiveMacros:
          Enabled:         false
          AcrossEmptyLines: false
          AcrossComments:  false
          AlignCompound:   false
          PadOperators:    true
        AlignEscapedNewlines: DontAlign
        AlignOperands:   Align
        AlignTrailingComments:
          Kind:            Always
          OverEmptyLines:  0
        AllowAllArgumentsOnNextLine: true
        AllowAllParametersOfDeclarationOnNextLine: true
        AllowShortBlocksOnASingleLine: Never
        AllowShortCaseLabelsOnASingleLine: false
        AllowShortEnumsOnASingleLine: true
        AllowShortFunctionsOnASingleLine: Inline
        AllowShortIfStatementsOnASingleLine: Never
        AllowShortLambdasOnASingleLine: All
        AllowShortLoopsOnASingleLine: false
        AlwaysBreakAfterDefinitionReturnType: None
        AlwaysBreakAfterReturnType: None
        AlwaysBreakBeforeMultilineStrings: false
        AlwaysBreakTemplateDeclarations: Yes
        AttributeMacros:
          - __capability
        BinPackArguments: false
        BinPackParameters: false
        BitFieldColonSpacing: Both
        BraceWrapping:
          AfterCaseLabel:  false
          AfterClass:      true
          AfterControlStatement: Never
          AfterEnum:       false
          AfterExternBlock: false
          AfterFunction:   true
          AfterNamespace:  false
          AfterObjCDeclaration: false
          AfterStruct:     true
          AfterUnion:      false
          BeforeCatch:     false
          BeforeElse:      false
          BeforeLambdaBody: false
          BeforeWhile:     false
          IndentBraces:    false
          SplitEmptyFunction: false
          SplitEmptyRecord: false
          SplitEmptyNamespace: false
        BreakAfterAttributes: Never
        BreakAfterJavaFieldAnnotations: false
        BreakArrays:     true
        BreakBeforeBinaryOperators: All
        BreakBeforeConceptDeclarations: Always
        BreakBeforeBraces: Custom
        BreakBeforeInlineASMColon: OnlyMultiline
        BreakBeforeTernaryOperators: true
        BreakConstructorInitializers: BeforeComma
        BreakInheritanceList: BeforeColon
        BreakStringLiterals: true
        ColumnLimit:     100
        CommentPragmas:  '^ IWYU pragma:'
        CompactNamespaces: false
        ConstructorInitializerIndentWidth: 4
        ContinuationIndentWidth: 4
        Cpp11BracedListStyle: true
        DerivePointerAlignment: false
        DisableFormat:   false
        EmptyLineAfterAccessModifier: Never
        EmptyLineBeforeAccessModifier: LogicalBlock
        ExperimentalAutoDetectBinPacking: false
        FixNamespaceComments: true
        ForEachMacros:
          - forever
          - foreach
          - Q_FOREACH
          - BOOST_FOREACH
        IfMacros:
          - KJ_IF_MAYBE
        IncludeBlocks:   Preserve
        IncludeCategories:
          - Regex:           '^"(llvm|llvm-c|clang|clang-c)/'
            Priority:        2
            SortPriority:    0
            CaseSensitive:   false
          - Regex:           '^(<|"(gtest|gmock|isl|json)/)'
            Priority:        3
            SortPriority:    0
            CaseSensitive:   false
          - Regex:           '.*'
            Priority:        1
            SortPriority:    0
            CaseSensitive:   false
        IncludeIsMainRegex: '(Test)?$'
        IncludeIsMainSourceRegex: ''
        IndentAccessModifiers: false
        IndentCaseBlocks: false
        IndentCaseLabels: false
        IndentExternBlock: AfterExternBlock
        IndentGotoLabels: true
        IndentPPDirectives: None
        IndentRequiresClause: true
        IndentWidth:     4
        IndentWrappedFunctionNames: false
        InsertBraces:    false
        InsertNewlineAtEOF: false
        InsertTrailingCommas: None
        IntegerLiteralSeparator:
          Binary:          0
          Decimal:         0
          Hex:             0
        JavaScriptQuotes: Leave
        JavaScriptWrapImports: true
        KeepEmptyLinesAtTheStartOfBlocks: false
        LambdaBodyIndentation: Signature
        LineEnding:      DeriveLF
        MacroBlockBegin: ''
        MacroBlockEnd:   ''
        MaxEmptyLinesToKeep: 1
        NamespaceIndentation: None
        ObjCBinPackProtocolList: Auto
        ObjCBlockIndentWidth: 4
        ObjCBreakBeforeNestedBlockParam: true
        ObjCSpaceAfterProperty: false
        ObjCSpaceBeforeProtocolList: true
        PackConstructorInitializers: BinPack
        PenaltyBreakAssignment: 150
        PenaltyBreakBeforeFirstCallParameter: 300
        PenaltyBreakComment: 500
        PenaltyBreakFirstLessLess: 400
        PenaltyBreakOpenParenthesis: 0
        PenaltyBreakString: 600
        PenaltyBreakTemplateDeclaration: 10
        PenaltyExcessCharacter: 50
        PenaltyIndentedWhitespace: 0
        PenaltyReturnTypeOnItsOwnLine: 300
        PointerAlignment: Right
        PPIndentWidth:   -1
        QualifierAlignment: Leave
        ReferenceAlignment: Pointer
        ReflowComments:  false
        RemoveBracesLLVM: false
        RemoveSemicolon: false
        RequiresClausePosition: OwnLine
        RequiresExpressionIndentation: OuterScope
        SeparateDefinitionBlocks: Leave
        ShortNamespaceLines: 1
        SortIncludes:    CaseSensitive
        SortJavaStaticImport: Before
        SortUsingDeclarations: LexicographicNumeric
        SpaceAfterCStyleCast: true
        SpaceAfterLogicalNot: false
        SpaceAfterTemplateKeyword: false
        SpaceAroundPointerQualifiers: Default
        SpaceBeforeAssignmentOperators: true
        SpaceBeforeCaseColon: false
        SpaceBeforeCpp11BracedList: false
        SpaceBeforeCtorInitializerColon: true
        SpaceBeforeInheritanceColon: true
        SpaceBeforeParens: ControlStatements
        SpaceBeforeParensOptions:
          AfterControlStatements: true
          AfterForeachMacros: true
          AfterFunctionDefinitionName: false
          AfterFunctionDeclarationName: false
          AfterIfMacros:   true
          AfterOverloadedOperator: false
          AfterRequiresInClause: false
          AfterRequiresInExpression: false
          BeforeNonEmptyParentheses: false
        SpaceBeforeRangeBasedForLoopColon: true
        SpaceBeforeSquareBrackets: false
        SpaceInEmptyBlock: false
        SpaceInEmptyParentheses: false
        SpacesBeforeTrailingComments: 1
        SpacesInAngles:  Never
        SpacesInConditionalStatement: false
        SpacesInContainerLiterals: false
        SpacesInCStyleCastParentheses: false
        SpacesInLineCommentPrefix:
          Minimum:         1
          Maximum:         -1
        SpacesInParentheses: false
        SpacesInSquareBrackets: false
        Standard:        Auto
        StatementAttributeLikeMacros:
          - Q_EMIT
        StatementMacros:
          - Q_UNUSED
          - QT_REQUIRE_VERSION
          - Q_CLASSINFO
          - Q_ENUM
          - Q_ENUM_NS
          - Q_FLAG
          - Q_FLAG_NS
          - Q_GADGET
          - Q_GADGET_EXPORT
          - Q_INTERFACES
          - Q_MOC_INCLUDE
          - Q_NAMESPACE
          - Q_NAMESPACE_EXPORT
          - Q_OBJECT
          - Q_PROPERTY
          - Q_REVISION
          - Q_DISABLE_COPY
          - Q_SET_OBJECT_NAME
          - QT_BEGIN_NAMESPACE
          - QT_END_NAMESPACE
          - QML_ADDED_IN_MINOR_VERSION
          - QML_ANONYMOUS
          - QML_ATTACHED
          - QML_DECLARE_TYPE
          - QML_DECLARE_TYPEINFO
          - QML_ELEMENT
          - QML_EXTENDED
          - QML_EXTENDED_NAMESPACE
          - QML_EXTRA_VERSION
          - QML_FOREIGN
          - QML_FOREIGN_NAMESPACE
          - QML_IMPLEMENTS_INTERFACES
          - QML_INTERFACE
          - QML_NAMED_ELEMENT
          - QML_REMOVED_IN_MINOR_VERSION
          - QML_SINGLETON
          - QML_UNAVAILABLE
          - QML_UNCREATABLE
          - QML_VALUE_TYPE
        TabWidth:        4
        UseTab:          Always
        WhitespaceSensitiveMacros:
          - BOOST_PP_STRINGIZE
          - CF_SWIFT_NAME
          - NS_SWIFT_NAME
          - PP_STRINGIZE
          - STRINGIZE
        ...
        
        
        JonBJ Offline
        JonBJ Offline
        JonB
        wrote last edited by
        #4

        @ronperek
        I don't know how relevant/if it helps, but it looks like 16 has indeed undergone some indentation code/behaviour change per https://www.qt.io/blog/qt-creator-16-beta2-released.

        Did you try searching the bug forum?

        1 Reply Last reply
        0
        • R Offline
          R Offline
          ronperek
          wrote last edited by
          #5

          Yeah. I found few issues related to indentation, but nothing exactly like my issue. I'll report this bug there. Thank you for help.

          1 Reply Last reply
          0
          • R ronperek

            I saw that thread, but found nothing useful to solve my problem in it.

            My settings:
            2025-04-24_13-53.png

            Clang settings:

            ---
            Language:        Cpp
            AccessModifierOffset: -4
            AlignAfterOpenBracket: Align
            AlignArrayOfStructures: None
            AlignConsecutiveAssignments:
              Enabled:         false
              AcrossEmptyLines: false
              AcrossComments:  false
              AlignCompound:   false
              PadOperators:    true
            AlignConsecutiveBitFields:
              Enabled:         false
              AcrossEmptyLines: false
              AcrossComments:  false
              AlignCompound:   false
              PadOperators:    true
            AlignConsecutiveDeclarations:
              Enabled:         false
              AcrossEmptyLines: false
              AcrossComments:  false
              AlignCompound:   false
              PadOperators:    true
            AlignConsecutiveMacros:
              Enabled:         false
              AcrossEmptyLines: false
              AcrossComments:  false
              AlignCompound:   false
              PadOperators:    true
            AlignEscapedNewlines: DontAlign
            AlignOperands:   Align
            AlignTrailingComments:
              Kind:            Always
              OverEmptyLines:  0
            AllowAllArgumentsOnNextLine: true
            AllowAllParametersOfDeclarationOnNextLine: true
            AllowShortBlocksOnASingleLine: Never
            AllowShortCaseLabelsOnASingleLine: false
            AllowShortEnumsOnASingleLine: true
            AllowShortFunctionsOnASingleLine: Inline
            AllowShortIfStatementsOnASingleLine: Never
            AllowShortLambdasOnASingleLine: All
            AllowShortLoopsOnASingleLine: false
            AlwaysBreakAfterDefinitionReturnType: None
            AlwaysBreakAfterReturnType: None
            AlwaysBreakBeforeMultilineStrings: false
            AlwaysBreakTemplateDeclarations: Yes
            AttributeMacros:
              - __capability
            BinPackArguments: false
            BinPackParameters: false
            BitFieldColonSpacing: Both
            BraceWrapping:
              AfterCaseLabel:  false
              AfterClass:      true
              AfterControlStatement: Never
              AfterEnum:       false
              AfterExternBlock: false
              AfterFunction:   true
              AfterNamespace:  false
              AfterObjCDeclaration: false
              AfterStruct:     true
              AfterUnion:      false
              BeforeCatch:     false
              BeforeElse:      false
              BeforeLambdaBody: false
              BeforeWhile:     false
              IndentBraces:    false
              SplitEmptyFunction: false
              SplitEmptyRecord: false
              SplitEmptyNamespace: false
            BreakAfterAttributes: Never
            BreakAfterJavaFieldAnnotations: false
            BreakArrays:     true
            BreakBeforeBinaryOperators: All
            BreakBeforeConceptDeclarations: Always
            BreakBeforeBraces: Custom
            BreakBeforeInlineASMColon: OnlyMultiline
            BreakBeforeTernaryOperators: true
            BreakConstructorInitializers: BeforeComma
            BreakInheritanceList: BeforeColon
            BreakStringLiterals: true
            ColumnLimit:     100
            CommentPragmas:  '^ IWYU pragma:'
            CompactNamespaces: false
            ConstructorInitializerIndentWidth: 4
            ContinuationIndentWidth: 4
            Cpp11BracedListStyle: true
            DerivePointerAlignment: false
            DisableFormat:   false
            EmptyLineAfterAccessModifier: Never
            EmptyLineBeforeAccessModifier: LogicalBlock
            ExperimentalAutoDetectBinPacking: false
            FixNamespaceComments: true
            ForEachMacros:
              - forever
              - foreach
              - Q_FOREACH
              - BOOST_FOREACH
            IfMacros:
              - KJ_IF_MAYBE
            IncludeBlocks:   Preserve
            IncludeCategories:
              - Regex:           '^"(llvm|llvm-c|clang|clang-c)/'
                Priority:        2
                SortPriority:    0
                CaseSensitive:   false
              - Regex:           '^(<|"(gtest|gmock|isl|json)/)'
                Priority:        3
                SortPriority:    0
                CaseSensitive:   false
              - Regex:           '.*'
                Priority:        1
                SortPriority:    0
                CaseSensitive:   false
            IncludeIsMainRegex: '(Test)?$'
            IncludeIsMainSourceRegex: ''
            IndentAccessModifiers: false
            IndentCaseBlocks: false
            IndentCaseLabels: false
            IndentExternBlock: AfterExternBlock
            IndentGotoLabels: true
            IndentPPDirectives: None
            IndentRequiresClause: true
            IndentWidth:     4
            IndentWrappedFunctionNames: false
            InsertBraces:    false
            InsertNewlineAtEOF: false
            InsertTrailingCommas: None
            IntegerLiteralSeparator:
              Binary:          0
              Decimal:         0
              Hex:             0
            JavaScriptQuotes: Leave
            JavaScriptWrapImports: true
            KeepEmptyLinesAtTheStartOfBlocks: false
            LambdaBodyIndentation: Signature
            LineEnding:      DeriveLF
            MacroBlockBegin: ''
            MacroBlockEnd:   ''
            MaxEmptyLinesToKeep: 1
            NamespaceIndentation: None
            ObjCBinPackProtocolList: Auto
            ObjCBlockIndentWidth: 4
            ObjCBreakBeforeNestedBlockParam: true
            ObjCSpaceAfterProperty: false
            ObjCSpaceBeforeProtocolList: true
            PackConstructorInitializers: BinPack
            PenaltyBreakAssignment: 150
            PenaltyBreakBeforeFirstCallParameter: 300
            PenaltyBreakComment: 500
            PenaltyBreakFirstLessLess: 400
            PenaltyBreakOpenParenthesis: 0
            PenaltyBreakString: 600
            PenaltyBreakTemplateDeclaration: 10
            PenaltyExcessCharacter: 50
            PenaltyIndentedWhitespace: 0
            PenaltyReturnTypeOnItsOwnLine: 300
            PointerAlignment: Right
            PPIndentWidth:   -1
            QualifierAlignment: Leave
            ReferenceAlignment: Pointer
            ReflowComments:  false
            RemoveBracesLLVM: false
            RemoveSemicolon: false
            RequiresClausePosition: OwnLine
            RequiresExpressionIndentation: OuterScope
            SeparateDefinitionBlocks: Leave
            ShortNamespaceLines: 1
            SortIncludes:    CaseSensitive
            SortJavaStaticImport: Before
            SortUsingDeclarations: LexicographicNumeric
            SpaceAfterCStyleCast: true
            SpaceAfterLogicalNot: false
            SpaceAfterTemplateKeyword: false
            SpaceAroundPointerQualifiers: Default
            SpaceBeforeAssignmentOperators: true
            SpaceBeforeCaseColon: false
            SpaceBeforeCpp11BracedList: false
            SpaceBeforeCtorInitializerColon: true
            SpaceBeforeInheritanceColon: true
            SpaceBeforeParens: ControlStatements
            SpaceBeforeParensOptions:
              AfterControlStatements: true
              AfterForeachMacros: true
              AfterFunctionDefinitionName: false
              AfterFunctionDeclarationName: false
              AfterIfMacros:   true
              AfterOverloadedOperator: false
              AfterRequiresInClause: false
              AfterRequiresInExpression: false
              BeforeNonEmptyParentheses: false
            SpaceBeforeRangeBasedForLoopColon: true
            SpaceBeforeSquareBrackets: false
            SpaceInEmptyBlock: false
            SpaceInEmptyParentheses: false
            SpacesBeforeTrailingComments: 1
            SpacesInAngles:  Never
            SpacesInConditionalStatement: false
            SpacesInContainerLiterals: false
            SpacesInCStyleCastParentheses: false
            SpacesInLineCommentPrefix:
              Minimum:         1
              Maximum:         -1
            SpacesInParentheses: false
            SpacesInSquareBrackets: false
            Standard:        Auto
            StatementAttributeLikeMacros:
              - Q_EMIT
            StatementMacros:
              - Q_UNUSED
              - QT_REQUIRE_VERSION
              - Q_CLASSINFO
              - Q_ENUM
              - Q_ENUM_NS
              - Q_FLAG
              - Q_FLAG_NS
              - Q_GADGET
              - Q_GADGET_EXPORT
              - Q_INTERFACES
              - Q_MOC_INCLUDE
              - Q_NAMESPACE
              - Q_NAMESPACE_EXPORT
              - Q_OBJECT
              - Q_PROPERTY
              - Q_REVISION
              - Q_DISABLE_COPY
              - Q_SET_OBJECT_NAME
              - QT_BEGIN_NAMESPACE
              - QT_END_NAMESPACE
              - QML_ADDED_IN_MINOR_VERSION
              - QML_ANONYMOUS
              - QML_ATTACHED
              - QML_DECLARE_TYPE
              - QML_DECLARE_TYPEINFO
              - QML_ELEMENT
              - QML_EXTENDED
              - QML_EXTENDED_NAMESPACE
              - QML_EXTRA_VERSION
              - QML_FOREIGN
              - QML_FOREIGN_NAMESPACE
              - QML_IMPLEMENTS_INTERFACES
              - QML_INTERFACE
              - QML_NAMED_ELEMENT
              - QML_REMOVED_IN_MINOR_VERSION
              - QML_SINGLETON
              - QML_UNAVAILABLE
              - QML_UNCREATABLE
              - QML_VALUE_TYPE
            TabWidth:        4
            UseTab:          Always
            WhitespaceSensitiveMacros:
              - BOOST_PP_STRINGIZE
              - CF_SWIFT_NAME
              - NS_SWIFT_NAME
              - PP_STRINGIZE
              - STRINGIZE
            ...
            
            
            JoeCFDJ Online
            JoeCFDJ Online
            JoeCFD
            wrote last edited by
            #6

            @ronperek It may be better to select "Spaces only" for Default tab policy. Otherwise, your code may not be displayed well from command line.

            1 Reply Last reply
            0
            • R Offline
              R Offline
              ronperek
              wrote last edited by
              #7

              Tabs worked fine for me so far. I don't like moving the cursor through all the spaces instead of 4x fewer tabs.

              jsulmJ 1 Reply Last reply
              0
              • JonBJ Offline
                JonBJ Offline
                JonB
                wrote last edited by
                #8

                In the good old days when tabs stops were always every 8 spaces under Unix at least it all worked fine. Nowadays with the ability to change what tabs mean per language/file and the mixing of spaces and tabs I often find tabbing a mess and sadly it's easier/more consistent to always put in spaces.

                1 Reply Last reply
                1
                • R ronperek

                  Tabs worked fine for me so far. I don't like moving the cursor through all the spaces instead of 4x fewer tabs.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote last edited by
                  #9

                  @ronperek said in Qt Creator 16 displays indentation incorrectly:

                  I don't like moving the cursor through all the spaces

                  You can move cursor word-wise by using CTRL-left_arrow and CTRL-right_arrow

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • R Offline
                    R Offline
                    ronperek
                    wrote last edited by
                    #10

                    Looks like this is only the issue for display. I noticed block selection works correctly acting like the elements after tab are in single column when initiating selection.

                    block selection.png

                    1 Reply Last reply
                    0
                    • aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote last edited by
                      #11

                      Reported as https://bugreports.qt.io/browse/QTCREATORBUG-32859

                      Qt has to stay free or it will die.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved