With QTextEdit you will have to use QTextDocument::addResource():
Just notice that QTextBrowser is capable of loading resources from local files out of the box.Qt Code:
textEdit->document()->addResource(QTextDocument::ImageResource, QUrl("url-used-in-html"), QImage("image.png"));To copy to clipboard, switch view to plain text mode
Bookmarks