Semantic HighlightingQt Creator understands the C++ and QML languages as code, not as plain text. It reads the source code, analyzes it, and highlights it based on the semantic checks that it does for the following code elements:
To specify the color scheme to use for semantic highlighting, select Tools > Options... > Text Editor > Fonts & Color. Qt Creator supports syntax highlighting also for other types of files than C++ or QML. Generic HighlightingGeneric highlighting is based on highlight definition files that are provided by the Kate Editor. You can download highlight definition files for use with Qt Creator. If you have a Unix installation that comes with the Kate Editor, you might already have the definition files installed. Typically, the files are located in a read-only directory, and therefore, you cannot manage them. Qt Creator can try to locate them and use them as fallback files, when the primary location does not contain the definition for the current file type. You can also specify the directory that contains preinstalled highlight definition files as the primary location. When you open a file for editing and the editor cannot find the highlight definition for it, an alert appears. You can turn off the alerts. You can also specify patterns for ignoring files. The editor will not alert you if highlight definitions for the ignored files are not found. To download highlight definition files:
Highlighting and Folding BlocksUse block highlighting to visually separate parts of the code that belong together. For example, when you place the cursor within the braces, the code enclosed in braces is highlighted. To enable block highlighting, select Tools > Options... > Text Editor > Display > Highlight blocks. Use the folding markers to collapse and expand blocks of code within braces. Click the folding marker to collapse or expand a block. In the figure above, the folding markers are located between the line number and the text pane. To show the folding markers, select Tools > Options... > Text Editor > Display > Display folding markers. This option is enabled by default. When the cursor is on a brace, the matching brace is animated by default. To turn off the animation and just highlight the block and the braces, select Tools > Options... > Text Editor > Display and deselect Animate matching parentheses. [Previous: Using the Editor] [Next: Checking Code Syntax] © 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. X
|