富文本示例

Qt 提供了一个功能强大的、面向文档的富文本引擎,支持 Unicode 以及从右向左书写的脚本。可以通过基于光标的 API 对文档进行操作,其内容既可以以 HTML 格式导入和导出,也可以以自定义 XML 格式进行操作。
“订单表单”示例展示了如何通过将简单模板与用户在对话框中输入的数据相结合来生成富文本文档。 | |
“语法高亮”示例展示了如何实现简单的语法高亮。 |
© 2026 The Qt Company Ltd. 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.