QPainter基本绘图


QPainter绘图系统 QPainter 和 QPaintDevice Qt 的绘图系统使用户可以在屏幕或打印设备上用相同的 API 绘图,绘图系统基于 QPainter、QPaintDevice 和 QPaintEngine 类。QPainter 是用来进行绘图操作的类,QPaintDevice

QPainter基本几何绘制


弧线 QRect rect(w/4, h/4, w/2, h/2); int startAngle = 90 * 16; int spanAngle = 90 * 16; painter.drawArc(rect, startAngle, spanAngle); 弦 QRect rect(w/4,