Qt基础——获取QGraphicsScene的缩略图即导出到图片

Qt基础——获取QGraphicsScene的缩略图即导出到图片,第1张

是应用了他的render函数,render的作用是:

Renders the source rect from scene into target, using painter. This function is useful for capturing the contents of the scene onto a paint device, such as a QImage (e.g., to take a screenshot), or for printing with QPrinter. For 

If source is a null rect, this function will use sceneRect() to determine what to render. If target is a null rect, the dimensions of painter's paint device will be used.

The source rect contents will be transformed according to aspectRatioMode to fit into the target rect. By default, the aspect ratio is kept, and source is scaled to fit in target.

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/2089694.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-07-22
下一篇 2022-07-22

发表评论

登录后才能评论

评论列表(0条)

保存