首页 > 学院 > 开发设计 > 正文

QPainter绘制 保存图片

2019-11-08 20:26:09
字体:
来源:转载
供稿:网友

先设置pixmap,在把painter 设置汇在 pixmap 上,然后更新painter

代码 :

    QPainter p;    QPixmap map(outLine.width(), outLine.height());    map.fill(Qt::transparent);    p.begin(&map);    text->drawOnPath(p, path);    p.end();    map.save("C:/Users/Administrator/Desktop/123.png", "PNG");


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表