Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved Show special characters in QT editor

    Tools
    2
    7
    4561
    Loading More Posts
    • 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.
    • B
      Bremenpl last edited by

      Hello there,
      Is there a way for QT Creator to show special characters in editor, such as: spaces, tabs, new lines?
      I would appreciate all help.

      lprzenioslo.zut.edu.pl

      1 Reply Last reply Reply Quote 0
      • Chris Kawa
        Chris Kawa Moderators last edited by

        Go to Tools->Options->Text Editor->Display tab and check "Visualize whitespace".

        B 1 Reply Last reply Reply Quote 2
        • B
          Bremenpl @Chris Kawa last edited by

          @Chris-Kawa Hi, thanks for answer. But this one only shows spaces. It doesnt show tabs and new lines. Btw, it also revealed that Qt creator is turning my tabs into spaces. Can this be changes?

          lprzenioslo.zut.edu.pl

          1 Reply Last reply Reply Quote 0
          • Chris Kawa
            Chris Kawa Moderators last edited by Chris Kawa

            It doesn't show new lines but it does show tabs:
            whitespace visualization in Qt Creator

            You can change whitespace related options in the Tools -> Options -> Text Editor -> Behavior tab. You can choose your preferred indent character, number of characters to indent, behavior of tab key and cleanup on save options.

            B 1 Reply Last reply Reply Quote 4
            • B
              Bremenpl @Chris Kawa last edited by

              @Chris-Kawa I tried doing it like you did, by my tabs are still generating spaces. Here is how I set it:

              0_1530037641963_1821add0-2f47-436a-b5ab-a88dbe6b7ea2-image.png

              Is there something I dont get?

              lprzenioslo.zut.edu.pl

              1 Reply Last reply Reply Quote 0
              • Chris Kawa
                Chris Kawa Moderators last edited by

                If it's indentation for code you're looking for then follow the blue C++ link in your picture.
                On the C++ settings page click "Copy...", give the new style some name, choose it from the "Current settings" combo and then click the "Edit" button. In the dialog that appears you can set tab/spaces options for C++.

                B 1 Reply Last reply Reply Quote 4
                • B
                  Bremenpl @Chris Kawa last edited by

                  @Chris-Kawa Understood. Thank you.

                  lprzenioslo.zut.edu.pl

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post