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. Indentation issue on QT Creator
Forum Updated to NodeBB v4.3 + New Features

Indentation issue on QT Creator

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
12 Posts 3 Posters 577 Views 1 Watching
  • 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.
  • aha_1980A Offline
    aha_1980A Offline
    aha_1980
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @pundang Please check the settings in Edit > Preferences > C++ > Code Style. The Text Editor settings are separate and not used for C++ files.

    Regards

    Qt has to stay free or it will die.

    1 Reply Last reply
    1
    • P Offline
      P Offline
      pundang
      wrote on last edited by
      #3

      I have my clang-format config enabled (the project's clang-format config is the same as mine) and as you can see in the preview tab it looks fine
      image.png

      Also, you can see that the lines indicating tab spacing look fine, even thought the tabs look too big.
      qtcreator_bw1QWx8Mux.gif

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

        @pundang Which Qt Creator version is that?

        Qt has to stay free or it will die.

        P 1 Reply Last reply
        0
        • aha_1980A aha_1980

          @pundang Which Qt Creator version is that?

          P Offline
          P Offline
          pundang
          wrote on last edited by
          #5

          @aha_1980 my QT Creator version is 16.0.0 (16.0.0-202503111335)

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

            @pundang That is interesting, because my dialog has some more settings in the upper part, that seem to be missing on yours:

            grafik.png

            Please double-check.

            Qt has to stay free or it will die.

            P 1 Reply Last reply
            0
            • aha_1980A aha_1980

              @pundang That is interesting, because my dialog has some more settings in the upper part, that seem to be missing on yours:

              grafik.png

              Please double-check.

              P Offline
              P Offline
              pundang
              wrote on last edited by
              #7

              @aha_1980 Oh I'm sorry, my screenshot wasn't good enough.
              af7f9e1f-0c7f-4499-8ffd-b9f86581bc99-image.png

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

                @pundang And is your file reformatted on save? Have you tried "Format while typing"?

                Qt has to stay free or it will die.

                P 1 Reply Last reply
                0
                • aha_1980A aha_1980

                  @pundang And is your file reformatted on save? Have you tried "Format while typing"?

                  P Offline
                  P Offline
                  pundang
                  wrote on last edited by
                  #9

                  @aha_1980 Yes, that option doesn't seem to fix anything.

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    pundang
                    wrote on last edited by
                    #10

                    I found out that for some reason, when I load some files Qt Creator shows the correct indentation size.
                    qt_creator.gif

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

                      @pundang Ok, can you please show your Text Editor settings? Edit > Preferences > Text Editor > Behavior > Tabs and Indentation

                      Is Auto detect checked there? How are the tab settings?

                      Qt has to stay free or it will die.

                      1 Reply Last reply
                      0
                      • JoeCFDJ Offline
                        JoeCFDJ Offline
                        JoeCFD
                        wrote on last edited by
                        #12

                        can you show Kits->TextEditor tab?

                        1 Reply Last reply
                        0
                        • JonBJ JonB referenced this topic on

                        • Login

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