- Create a Qt Widgets Applications project.
- In Projects view, right-click the project's root node and select "Add New..." from the context menu.
- Add a C++-class derived from Q_Object.
- Add the line
- Place your cursor at the end of that line and press Alt+Enter.
- Press Enter.
The inserted code is indented incorrectly.
- Remove the inserted code.
- Remove the Q_OBJECT macro from the class.
- Repeat steps 5 and 6.
The inserted code is indented correctly.
Automatically generated code should always be indented correctly. Maybe this is related to
QTCREATORBUG-11413 although I can't reproduce that one in 3.3.