路径描边

“路径描边”示例展示了可用于QPainter 的各种笔型。

一个展示可调节曲线和曲线样式选项的应用程序

Qt 定义了用于处理端点的“端点样式”以及用于连接路径段的“连接样式”。此外,还包含了一套标准的预定义虚线图案,可与QPen 配合使用。

除了QPen 中提供的预定义图案外,我们还演示了如何直接使用QPainterPathStroker 类来定义自定义虚线图案。您可以通过启用“自定义图案”选项来查看此功能。

示例项目 @ code.qt.io

© 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.