首页| 论坛| 消息

标题:如何直接保存Canvas的图片?
作者:pangpangpang
日期:2014-10-15 17:11
内容:

Canvas 的画笔画的图形如何直接保存?


#1 [rpdhunter 10-15 20:39]
Canvas 这东西是qt3时代的了吧,现在已经被QGraphics框架代替啦,楼主看看新的吧
#2 [uidab 10-16 09:46]
bool save(string filename)
Save the current canvas content into an image file filename. The saved image format is automatically decided by the filename's suffix.
Note: calling this method will force painting the whole canvas, not just the current canvas visible window.
不知道这个有没有帮助。
楼上这是QML中的,和Qt3不一样。
#3 回 uidab 的帖子 [pangpangpang 10-16 15:23]
uidab:bool save(string filename)
Save the current canvas content into an image file filename. The saved image format is automatically decided by the filename's suffix.
Note: calling this method will force painting the whole canvas, not just the current canvas v .. (2014-10-16 09:46) 
嗯,谢谢,这个是可以保存,不过效果不是我想要的~
#4 回 rpdhunter 的帖子 [pangpangpang 10-20 11:01]
rpdhunter:Canvas 这东西是qt3时代的了吧,现在已经被QGraphics框架代替啦,楼主看看新的吧 (2014-10-15 20:39) 
Qt5里面也有

回复 发表
主题 版块