Some more difficult tweaking of the text editor



    1. How do I enable that public, private and protected keywords are indented with 2 spaces, while I want that normal indentation is 4 spaces ?
    2. How do I disable the mechanism that adds 2 indentations instead of 1 for line continuations ?
      For example:
      void test_func(
      <indent>int arg0)
      instead of:
      void test_func(
      <indent><indent>int arg0)

  • Moderators

    Go to Tools->Preferences->C++ and modify the code style visible in the first tab.



  • I am working with Qt Creator 2.8.1, so the menus are a bit different. Still, with the provided settings I am not able to enable the aforementioned behaviour. Before considering a newer version: were you able to actually achieve this with the newer settings ? Just to avoid an upgrade in vain ... (and possibly broken plugins)


  • Moderators

    No, I am happy with Qt Creator's default code formatting, so I had no need to change it.


Log in to reply
 

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