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. How to align slashes, equals etc. in Qt Creator?
Qt 6.11 is out! See what's new in the release blog

How to align slashes, equals etc. in Qt Creator?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
6 Posts 3 Posters 1.8k 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.
  • I Offline
    I Offline
    Ibrahim
    wrote on last edited by
    #1

    Hi; I want to align slashes etc. like Emacs in Qt Creator. How can I do that? Thanks. Example code:

    #define CHECK(n)       \
      switch (n)           \
      {                    \
      case 0:              \
        cout << 0 << endl; \
        break;             \
      case 1:              \
        cout << 1 << endl; \
        break;             \
      }
    
    1 Reply Last reply
    0
    • JohanSoloJ Offline
      JohanSoloJ Offline
      JohanSolo
      wrote on last edited by
      #2

      You can use the beautifier menu. which will use an external program to format your code. I use uncrustify, which can be long to configure but produces highly customisable output.

      `They did not know it was impossible, so they did it.'
      -- Mark Twain

      1 Reply Last reply
      0
      • I Offline
        I Offline
        Ibrahim
        wrote on last edited by
        #3

        Thanks, but I don't understand that. Can you give me information?

        JohanSoloJ 1 Reply Last reply
        0
        • I Ibrahim

          Thanks, but I don't understand that. Can you give me information?

          JohanSoloJ Offline
          JohanSoloJ Offline
          JohanSolo
          wrote on last edited by
          #4

          @Ibrahim said:

          Thanks, but I don't understand that. Can you give me information?

          What don't you understand?
          What's your platform? I guess linux since you're mentioning emacs. Then install one of the code formatting tools from the aforementioned link, tell QtCreator about it and edit your coding style. This last step highly depends on the chosen formatter.

          `They did not know it was impossible, so they did it.'
          -- Mark Twain

          1 Reply Last reply
          0
          • I Offline
            I Offline
            Ibrahim
            wrote on last edited by
            #5

            I am using Windows. I don't understand 'Uncrustify command' and 'Use customized style'. What is they? How can I set they?

            1 Reply Last reply
            0
            • jacmoeJ Offline
              jacmoeJ Offline
              jacmoe
              wrote on last edited by
              #6

              @Ibrahim Search for it! http://uncrustify.sourceforge.net/

              Less noise - more signal

              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