The Code Editor

Qt Creator's code editor is designed to aid the developer to create, edit, and navigate code. It is fully equipped with syntax highlighting, code completion, context sensitive help, as well as inline error indicators while you are typing. The screenshots below show the various dialogs within which you can configure your editor.

To navigate between blocks, e.g., from one { to another } , use Ctrl+[ and Ctrl+].

Block selection

To select a current block, use Ctrl+U. Pressing Ctrl+U again extends the selection to the parent block. To deselect, use Ctrl+Shift+U.

Moving lines up and down

Use Ctrl+Shift+Up and Ctrl+Shift+Down

Completion

Use Ctrl+Space

Indenting Blocks

Use Ctrl+I

Collapse

Use Ctrl+<

Commenting or uncommenting blocks

Use Ctrl+/

Delete a line

Use Shift+Del

Switch between header file and source file

Use F4.

Increasing and decreasing font size

Use Ctrl+Scroll Wheel

Follow symbols under the cursor

Use F2 and Shift+F2. This feature works with namespaces, classes, methods, variables, include statements, and macros.

Switch to an external editor

Select Open in external editor from the Edit -> Advanced menu.

Code Completion

The completion popup shows possible completions to a certain statement. These completions include classes, namespaces, functions, variables, macros and keywords. Listed below are the icons used in the completion box and their meaning.