我使用Python和PySide/PyQt4基于QTextEditor的WYSIWYG编辑器,我需要将来自网站的图像作为<img>
标记插入其中,但它只是将其添加为小图标。在
插入图像的代码如下:
url = 'http://yoursportsfeeder.com/wp-content/uploads/2014/12/ap-patriots-ravens-football-720x400.jpg'
self.text.setHtml('<img src="%s" />' % url)
当执行这段代码时,我得到的图标如下图所示(只是一个白色的小图标)
我怎样才能得到图片预览?在
目前没有回答
相关问题 更多 >
编程相关推荐