c++ - Qt - Add content of QTextDocument to another one - Images not added -
i'm trying merge 2 qtextdocument
, can retrieve text not images, here code example :
qtextdocument doc2("test"); qtextcursor cursor(&doc2); cursor.moveposition(qtextcursor::end); cursor.inserthtml(doc1.tohtml()); //doc1 contains text , image qtextdocumentwriter docwriter; docwriter.setfilename("temptest.odf"); docwriter.setformat("odf"); docwriter.write(&doc2);
if i'm writing doc1
directly, have images in file it's working don't know how transfer images qtextdocument
.
or maybe possible write 2 documents in same file when try last write done :
docwriter.write(&doc1); docwriter.write(&doc2);
i don't see how append each of them file.
Comments
Post a Comment