Hello there, I'm having a problem with QTextEdit/QTextDocument when i'm trying to export the document to html via QTextEdit::toHtml() . The problem lies when we insert an image using QTextDocument::addResource() and, although QTextEdit shows it fine, it crashes when we call QTextEdit::toHtml() function. Any words of advice? Some snippet above:
... QImage img(img1Path); QUrl uri = QUrl::fromLocalFile(img1Path); m_doc->addResource(QTextDocument::ImageResource, uri, QVariant(img)); QTextImageFormat imageFormat; imageFormat.setWidth(300); imageFormat.setHeight(300); imageFormat.setName(uri.toString()); cursor.insertImage(imageFormat); ... // when it crashes QString html = m_doc->toHtml(); It works fine when a image is not inserted. Att, Paulo Pinheiro
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest