path.addEllipse(0, 0, 50, 50);
path.closeSubpath();
qDebug() << path.currentPosition();
path.moveTo(25, 25);
path.lineTo(25, 40);
m_polygon = path.toFillPolygon();
QPainterPath path;
path.addEllipse(0, 0, 50, 50);
path.closeSubpath();
qDebug() << path.currentPosition();
path.moveTo(25, 25);
path.lineTo(25, 40);
m_polygon = path.toFillPolygon();
To copy to clipboard, switch view to plain text mode
path.addRect(20, 20, 60, 60);
path.moveTo(0, 0);
path.cubicTo(99, 0, 50, 50, 99, 99);
path.cubicTo(0, 99, 50, 50, 0, 0);
painter.fillRect(0, 0, 100, 100, Qt::white);
painter.
setPen(QPen(QColor(79,
106,
25),
1, Qt
::SolidLine,
Qt::FlatCap, Qt::MiterJoin));
painter.
setBrush(QColor(122,
163,
39));
painter.drawPath(path);
QPainterPath path;
path.addRect(20, 20, 60, 60);
path.moveTo(0, 0);
path.cubicTo(99, 0, 50, 50, 99, 99);
path.cubicTo(0, 99, 50, 50, 0, 0);
QPainter painter(this);
painter.fillRect(0, 0, 100, 100, Qt::white);
painter.setPen(QPen(QColor(79, 106, 25), 1, Qt::SolidLine,
Qt::FlatCap, Qt::MiterJoin));
painter.setBrush(QColor(122, 163, 39));
painter.drawPath(path);
To copy to clipboard, switch view to plain text mode
Bookmarks