Can QTextBrowser display remote images?
I use a QTextBrowser in my code, and pass an html text to it via QTextBrowser::setHtml() function.
but it can't display images on the web, for example, when I pass this text to the above function:
Code:
<p><img src="http://i39.tinypic.com/2cqlhtg.jpg" /></p>
just an file icon will be showed in the QTextBrowser, not the image itself.
but it can display images on local computer, even when the image path starts with "file://" prefix.
after all, is there any flag which I should set to make QTextBrowser get the image data automatically? or is there any similar qt widget which I can use instead?
I know QWebView can display both local and remote images, but I need a widget with ability to edit its content.
thanks.
Re: Can QTextBrowser display remote images?
Unfortunately QTextBrowser can show local images only. However, there's a way to load remote files yourself via QTextBrowser::loadResource(). See QTextEdit and delayed image loading for more details.