Qt绘图paint移动画家

void paintEvent(QPaintEvent *event) override
{
    QPainter painter(this);
    painter.drawEllipse(QPoint(100, 100), 50, 50);

    /* 移动画家 */
    painter.translate(QPoint(100, 0));
    painter.drawEllipse(QPoint(100, 100), 50, 50);
}

posted @ 2022-08-04 17:05  thomas_blog  阅读(94)  评论(0编辑  收藏  举报