Qt Creator Manual

Specifying Text Editor Settings

Set the font preferences and apply color schemes for syntax highlighting in Tools > Options > Text Editor > Font & Colors.

"Text editor options"

Configuring Fonts

You can select the font family and size. You can specify a zoom setting in percentage for viewing the text. You can also zoom in or out by pressing Ctrl++ or Ctrl +-, or by pressing Ctrl and rolling the mouse button up or down. To disable the mouse wheel function, select Tools > Options > Text Editor > Behavior and deselect the Enable scroll wheel zooming check box.

Antialiasing is used by default to make text look smoother and more readable on the screen. Deselect the Antialias check box to turn off antialiasing.

Defining Color Schemes

You can select one of the predefined color schemes for syntax highlighting or create customized color schemes. The color schemes apply to highlighting both C++ and QML files and generic files.

To create a color scheme:

  1. Select Tools > Options > Text Editor > Fonts & Color > Copy.
  2. Enter a name for the color scheme and click OK.
  3. In the Foreground field, specify the color of the selected code element.
  4. In the Background field, select the background color for the code element.

    The backgound of the Text element determines the background of the code editor.

When you copy code from Qt Creator, it is copied in both plain text and HTML format. The latter makes sure that syntax highlighting is preserved when pasting to a rich-text editor.

File Encoding

To define the default file encoding, select the desired encoding in Default encoding. By default, Qt Creator uses the file encoding used by your system.