Populate a QTextDocument from a .odt file

大城市里の小女人 提交于 2019-12-20 03:39:10

问题


I am writing a rich text editor using C++ and Qt. For now, I would like it to support (at least) the .odt format.

I found QTextDocumentWriter for writing the contents of the QTextDocument to a file, but I can't seem to find anything to read that back into the QTextDocument, which obviously makes saving it sort of useless in the first place.

So the question is, how do I load an .odt document into a QTextDocument?


回答1:


Qt does not currently support the ODT format. Okular has code that does parses ODT to a QTextDocument. Beware: Okular source code is released under GPL license.



来源:https://stackoverflow.com/questions/3747180/populate-a-qtextdocument-from-a-odt-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!