Results 1 to 2 of 2

Thread: QtCreator indent

  1. #1
    Join Date
    Jun 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default QtCreator indent

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

    Qt Code:
    1. if(flag==6){
    2. bufferIndex+=5;
    3. }
    To copy to clipboard, switch view to plain text mode 
    to code with spaces before and after keyword and operators?

    Qt Code:
    1. if ( flag == 6 ) {
    2. bufferIndex += 5;
    3. }
    To copy to clipboard, switch view to plain text mode 

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

    Qt Code:
    1. if(flag==6){
    2. bufferIndex+=5;
    3. }
    To copy to clipboard, switch view to plain text mode 

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

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QtCreator indent

    Currently this is not possible. But see my signature... (build versions for 2.8.0 will follow the next days).

    Alternatively you can use any source code beautifier and add it to Qt Creator via a custom command.

Similar Threads

  1. text indent with wrap
    By linuxsong in forum Qt Quick
    Replies: 1
    Last Post: 26th July 2011, 14:14
  2. VS plugin and indent space
    By nroberts in forum Qt Programming
    Replies: 0
    Last Post: 16th November 2010, 18:14
  3. indent selection in QPlainTextEdit
    By qt_gotcha in forum Newbie
    Replies: 1
    Last Post: 24th August 2010, 19:06
  4. trying to indent
    By jajdoo in forum Newbie
    Replies: 1
    Last Post: 19th July 2010, 23:25
  5. QTreeView indent
    By evgenM in forum Newbie
    Replies: 0
    Last Post: 18th August 2009, 11:53

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.