先设置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");
新闻热点
疑难解答