QtCreator indent



  • 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.


  • Moderators

    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.