Completion | Qt Creator Documentation
Description: Set preferences for code completion and inserting matching characters in the text editor.

- Qt Creator Documentation
- Completion
- Qt Creator 19.0.1

Code Model ◦ Editing code

# Completion

To set preferences for code completion, select Preferences > Text Editor > Completion.

## Code completion behavior

By default, code completion does not consider case. To apply full or first-letter case-sensitivity, select Full or First Letter in the Case-sensitivity field.

By default, code completion is always invoked, but you can change this behavior in the Activate completion field to invoke it Manually or When Triggered.

You can set a timeout in milliseconds for code completion in the Timeout in ms field.

In the Character threshold field, specify the number of characters you need to enter before code completion is triggered.

When completion is invoked manually, Qt Creator completes the common prefix of the list of suggestions. This is especially useful for classes with several similarly named members. To disable this functionality, clear Autocomplete common prefix.

Select Automatically split strings to split a string to two lines by adding an end quote at the cursor position when you select Enter and a start quote at the beginning of the next line, before the rest of the string. In addition, selecting Shift+Enter inserts an escape character at the cursor position and moves the rest of the string to the next line.

## Automatically inserting matching characters

When you have selected code and enter brackets or quotes, the matching closing character is added automatically at the end of the selection.

By default, the automatically inserted text is highlighted and animated, skipped when you type, and removed when you select Backspace.

See also How to: Configure editors, Complete CMake code, Complete code, Enclose code in brackets or quotes, and Nim.

Code Model ◦ Editing code