开发者

Which Qt widget (not webkit) that can display html image link (like item list)

开发者 https://www.devze.com 2023-02-21 14:42 出处:网络
i like to display image from server without downloading it , sure i can use qwebkit. but i like to be able to display the image in some kind of开发者_如何学JAVA list . what option do i have ? I know t

i like to display image from server without downloading it , sure i can use qwebkit. but i like to be able to display the image in some kind of开发者_如何学JAVA list . what option do i have ?


I know that QTextEdit supports img tags, and I use them in lists. However, I don't know if it actually supports full URLs for those images, I just use images from the resource file. You could however give it a try.

Use setHTML() to set the HTML source code, setText() assumes plain-text.


You -have to- download the image manually and load it into a QPixmap to show it. You can use libcurl to download the image, it's pretty solid and works on virtually any platform. And really easy to use.

0

精彩评论

暂无评论...
验证码 换一张
取 消