mTextEdit->setHtml(text); page = new QWebPage(); QWebFrame* frame; frame = page->mainFrame(); frame->setHtml(text); foreach (QWebElement element, frame->findAllElements("img")) { QStringList attributesList = element.attributeNames(); foreach (QString AttributeName, attributesList) { if(AttributeName == "src"){ QUrl url; url = element.attribute(AttributeName); mTextEdit->loadResource(QTextDocument::ImageResource, url); qDebug() <<AttributeName <<":" << element.attribute(AttributeName); } } }