更改编辑器颜色
您可以为文本编辑器选择一个预定义配色方案,也可以创建自定义配色方案。
要创建配色方案,请
- 选择首选项>Text Editor >Font & Colors >Copy 。
- 输入配色方案的名称,然后选择OK 。
- 在Foreground 字段中,指定所选代码元素或信息的颜色。
- 在Background 字段中,选择代码元素或信息的背景颜色。
Text 元素的背景决定了代码编辑器的背景。
- 在Font 中,选择Bold 或Italic ,对所选代码元素或信息的文本进行加粗或斜体格式化。
- 在Underline 中,选择用于下划线代码元素或信息的颜色和样式。
从Qt Creator 复制代码时,会同时以纯文本和 HTML 格式复制。后者可确保在粘贴到富文本编辑器时保留语法高亮。
导出和导入配色方案
要与他人共享配色方案,可将其导出或导入 XML 文件。要导出配色方案,请选择首选项>Text Editor >Font & Colors >Export ,然后选择 XML 文件的文件名和位置。
要导入配色方案,请选择Import ,然后选择要导入的 XML 文件。在Import Color Scheme 对话框中,输入配色方案的名称Color scheme name :
选择OK 时,该配色方案将添加到Font & Colors 选项卡的配色方案列表中。
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.