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. QtCreator indent
Forum Updated to NodeBB v4.3 + New Features

QtCreator indent

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 1.2k 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.
  • B Offline
    B Offline
    bataliero
    wrote on last edited by
    #1

    Hi, is it possible to indent code in QtCreator from this:

    @
    if(flag==6){
    bufferIndex+=5;
    }
    @

    to code with spaces before and after keyword and operators?

    @
    if ( flag == 6 ) {
    bufferIndex += 5;
    }@

    After indent ( ctrl + I ) I get only aligment of 2.line and result is lik this:

    @if(flag==6){
    bufferIndex+=5;
    }@

    I have found it is possible to change CodeStyle in projects but don't know how to add this spaces.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      welcome to devnet

      Since you have found the code style page under options already. Try "copy ..." of current settings and change it there and press "Apply". IIRC it is as easy as that. I remember to have used export and import possibility, but I believe this was for getting it to another machine.

      Vote the answer(s) that helped you to solve your issue(s)

      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