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. [Solved] Creator: Spaces used instead of tabs despite "Tab only" policy
QtWS25 Last Chance

[Solved] Creator: Spaces used instead of tabs despite "Tab only" policy

Scheduled Pinned Locked Moved Qt Creator and other tools
10 Posts 4 Posters 4.3k 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on 5 Nov 2014, 11:57 last edited by
    #1

    I use Creator to edit a non-source code file (extension is 'mls').
    The tab policy under Tools->Options->Text Editor->Behavior->Tabs and Indentation is "Tabs only".

    Still, sometimes the tab is replaced with spaces as I type.

    How can I prevent this?
    (Version 3.2.2)

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 5 Nov 2014, 12:07 last edited by
      #2

      Sounds like a bug. I guess the bug tracker would be happy to know about this :-)

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Asperamanca
        wrote on 5 Nov 2014, 12:10 last edited by
        #3

        Interestingly, it creates spaces at first. If I hit tab again, the spaces are replaced with a single tab.
        To to write a single tab, I have to hit the tab key twice.

        (Sometimes - because sometimes hitting it once works just fine)

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 5 Nov 2014, 12:20 last edited by
          #4

          Now it sounds even more like a bug :-) "Link to the bug tracker":https://qt-project.org/wiki/ReportingBugsInQt

          (Z(:^

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Asperamanca
            wrote on 5 Nov 2014, 12:25 last edited by
            #5

            The trick before reporting is to create reliable "steps to repeat". I haven't been able to do that...yet.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andrep
              wrote on 5 Nov 2014, 19:59 last edited by
              #6

              Can you please list all the TextEditor/Behaviour settings? Is your tabsize equal to the indentsize?

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Asperamanca
                wrote on 6 Nov 2014, 08:08 last edited by
                #7

                Tabsize is 8, Indent size is 4.
                Align continuation lines "With Spaces"
                Enable automatic indentation: Yes
                Backspace indentation: None
                Tab key performs auto-indent: Never

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andrep
                  wrote on 6 Nov 2014, 18:43 last edited by
                  #8

                  So when you hit the tab key once, you get four spaces (for one level of indentation, that's not representable with tabs of size 8), and on the second press you get one "real" tab worth of 8 position? That would be "expected behaviour".

                  C 1 Reply Last reply 8 Oct 2015, 15:40
                  0
                  • A Offline
                    A Offline
                    Asperamanca
                    wrote on 7 Nov 2014, 07:48 last edited by
                    #9

                    Well, if the "Tab policy" is "Tabs Only", I never expect to get spaces when I hit tab. It's a bit of a contradiction. But I see your point - and it's easy enough to change the settings. Thanks!

                    1 Reply Last reply
                    0
                    • A andrep
                      6 Nov 2014, 18:43

                      So when you hit the tab key once, you get four spaces (for one level of indentation, that's not representable with tabs of size 8), and on the second press you get one "real" tab worth of 8 position? That would be "expected behaviour".

                      C Offline
                      C Offline
                      Charalambos
                      wrote on 8 Oct 2015, 15:40 last edited by
                      #10

                      @andrep Hi, i have a similar problem but this time with tabs in between previously written code. So when i press TAB the right amount of spaces are created but when i DELETE one character at a time is removed. TAB only works if it is the first thing i write per line, e.g. if i enter more than 1 TAB and press DELETE the cursor goes back a TAB at a time and not a SPACE as in the previous example. Could you help? Thank you :)

                      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