[Qt-creator] Collapse/expand case statements?

Murphy, Sean smurphy at walbro.com
Thu Aug 6 14:47:53 CEST 2015


Is there a way in Creator to collapse and expand case blocks that I'm missing? It looks like Creator offers the ability to collapse/expand the entire switch statement, and other types of code blocks (if/if else/else blocks, while loops, for loops, etc.),  but not the individual case blocks.

I'd like to be able to make this:
  switch(foo)
  {
  case 0:
    <case 0 line 1>
    <case 0 line 2>
    ...
    <case 0 line n>
  case 1:
    <case 1 line 1>
    ...
    <case 1 line m>
  }

Look like this:
  switch(foo)
  {
  case 0: {...}
  case 1: {...}
  }

But it appears all I can do is make it look like this:
  switch(foo)  {...}

I'm using Qt Creator 3.2.2, so if the answer is just "upgrade Creator", I'm happy to do so.

Sean



More information about the Qt-creator mailing list