Read (and write) RTF files with C++ / Qt


Question

I am looking for a simple C++ library for tokenizing and parsing RTF (Rich Text Format) files. I am planning to edit them with Qt's QTextEdit.

More the Formatting preserved the better -- but actually I am planning to use Bold and Italics only.

In perl I would use RTF::Tokenizer.

It would be nice if the module had some sort of interface for writing also, but I am able to brute force that with a template and some regular expressions... :)

Thank you.

1
14
11/16/2008 8:21:37 PM

I helped writing the RTF import export filter in KOffice. You can have a look at the code at https://cgit.kde.org/koffice.git/tree/filters/kword/rtf. The code is modular and it depends only on Qt.

10
1/14/2017 10:54:11 AM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon