Display
To set preferences for how Qt Creator displays code and text in the editor, select Preferences > Text Editor > Display.

Setting the margin
In the Margin group, you can turn on a vertical line that marks a column in the editor, which is useful for keeping lines within a certain length.
The following table describes the margin preferences you can set.
| Preference | Description |
|---|---|
| Display right margin after column | Show a vertical line after the specified column. The default is column 80. |
| Tint whole margin area | Shade the area beyond the margin. Available when Display right margin after column is selected. |
| Use context-specific margin | Use a different margin if one is available from the current context, such as the column limit configured for the ClangFormat plugin. |
| Editor content width | Set the percentage of the editor window width used to display text content. The default value, 100%, uses the whole width. At 50%, half of the editor width is used to display content, and the remaining width is split between left and right margins to center the content. |
Wrapping text
To wrap long lines to fit the width of the editor, select Enable text wrapping in the Wrapping group. This option is available only when Line spacing is set to 100% in Font & Colors preferences.
Setting display preferences
The following table describes the preferences you can set in the Display group.
| Preference | Description |
|---|---|
| Display line numbers | Show line numbers in the editor. |
| Display folding markers | Show markers for folding and unfolding blocks of code. |
| Mark text changes | Mark lines that you added or modified since the file was opened or last saved. |
| Visualize whitespace | Show tabs and spaces in the editor. |
| Center cursor on scroll | Keep the cursor vertically centered while scrolling. |
| Auto-fold first comment | Automatically fold the first comment block in a file, such as a license header. |
| Highlight search results on the scrollbar | Mark the locations of search results on the scrollbar. |
| Animate navigation within file | Animate the view when you jump to a different location within the same file. |
| Highlight selection | Add a colored background and a scrollbar marker to other occurrences of the currently selected text. |
| Highlight current line | Highlight the line that contains the cursor. |
| Highlight blocks | Highlight the code block enclosed by the braces nearest to the cursor. See also Highlight code blocks. |
| Animate matching parentheses | Animate the matching parenthesis, brace, or bracket when the cursor is next to one of them. |
| Visualize indent | Show vertical indent guides. |
| Highlight matching parentheses | Highlight matching parentheses, braces, and brackets. |
| Always open links in another split | Open links, such as links to symbol definitions, in another split view instead of the current one. |
| Display file encoding | Show the text encoding of the current file in the editor status bar. |
| Display file line ending | Show the line ending style of the current file in the editor status bar. |
| Display tab settings | Show the indentation settings of the current file in the editor status bar. |
| Enable minimap | Show a miniature, zoomed-out overview of the file next to the scrollbar. |
Showing line annotations
Line annotations show additional information next to a line, such as the results of code analysis or version control information from git blame, in the editor.
To turn off line annotations, clear Line Annotations in the Line Annotations group.
To select where to show the annotations, use Line Annotations:
- Next to editor content shows annotations directly after the code on the line.
- Next to right margin shows annotations aligned with the right margin, or after the code if the line is longer than the margin.
- Aligned at right side shows annotations aligned at the right side of the editor. This is the default.
- Between lines shows annotations on their own line, between the lines of code.
See also How to: Configure editors, Configuring editors, Highlight code blocks, Analyzing code, and git blame.