forked from qt-creator/qt-creator
Help: Fix rendering images with litehtml
Creating the document parses it, which also populates the pixmap cache, so we may not clear the pixmap cache afterwards. Change-Id: I1e6d1669db898b1e50d59d135e52807afb307d09 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -422,10 +422,7 @@ QUrl QLiteHtmlWidget::url() const
|
||||
|
||||
void QLiteHtmlWidget::setHtml(const QString &content)
|
||||
{
|
||||
litehtml::document::ptr doc = litehtml::document::createFromUTF8(content.toUtf8().constData(),
|
||||
&d->documentContainer,
|
||||
&d->context);
|
||||
d->documentContainer.setDocument(doc);
|
||||
d->documentContainer.setDocument(content.toUtf8(), &d->context);
|
||||
verticalScrollBar()->setValue(0);
|
||||
horizontalScrollBar()->setValue(0);
|
||||
render();
|
||||
|
||||
Reference in New Issue
Block a user