Filling a QTextDocument from a .odt File

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 a QTextDocumentWriter to write the contents of a QTextDocument file to a file, but I cannot find anything to read it back to a QTextDocument, which obviously makes saving it useless in the first place.

So the question is how to load a .odt document into a QTextDocument?

+2
source share
1 answer

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

+1
source

Source: https://habr.com/ru/post/1779472/


All Articles