选择行结束样式

要在 Windows 行结束符 (CRLF) 和 Unix 行结束符 (LF) 之间切换,请在Edit 模式下选择编辑器工具栏 (3) 上的结束符样式。

编辑模式工具栏

要隐藏该字段,请转至首选项>Text Editor >Display ,然后清除Display file line ending

设置默认样式

要设置所有项目默认使用的行尾,请转到首选项>Text Editor >Behavior ,然后在Default line endings 中选择结尾样式。

文本编辑器首选项 "行为 "选项卡中的默认文件结尾

要为某个项目设置行结束符,请访问Projects >Project Settings >Editor

项目的编辑器设置

另请参阅 如何:编辑代码指定编辑器设置编辑模式

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.