绘图示例

展示各种几何形状和风格的应用程序

Qt 的绘图系统能够以亚像素精度渲染矢量图形、图像以及基于轮廓字体的文本,并利用抗锯齿技术来提高渲染质量。

这些示例展示了使用 Qt 进行绘制时最常用的技术,从绘制简单基元等基本概念到变换的使用。

Affine Transformations

演示了 QPainter 中的仿射变换是如何工作的。

Basic Drawing Example

“基本绘图”示例展示了如何使用 QPainter 类以各种样式显示基本图形基元。

Composition Modes

演示了 QPainter 中合成模式的工作原理。

Gradients

演示了如何在 QPainter 中使用渐变。

Image Composition Example

展示了 QPainter 中的合成模式如何工作。

Painter Paths Example

“绘图路径”示例展示了如何使用绘图路径构建用于渲染的复杂形状。

Path Stroking

“路径描边”示例展示了可与 QPainter 配合使用的各种笔类型。

Transformations Example

“变换”示例展示了变换如何影响 QPainter 渲染图形基元的方式。

Vector Deformation

演示了如何操作 QPainterPath 的元素。

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