Existing open-source solutions for displaying RTF text in a Qt application?
-
wrote on 28 Mar 2015, 20:08 last edited by
It appears that Qt does not in any way support RTF text format, which is sort of weird. Anyway, I'm sure many people before me faced the problem and there bound to be a solution by now. I was thinking in the direction of RTF to HTML converter. Found a couple, but none are really cross-platform (I need Win, Mac and Linux). Any suggestions for me, please?
-
Hi,
You should take a look at Calligra IIRC they support rtf
-
wrote on 30 Mar 2015, 10:04 last edited by
-
Sounds like it fit your needs, correct ?
-
wrote on 4 Apr 2015, 08:05 last edited by Violet Giraffe 4 Apr 2015, 08:11
No. If I understand correctly, rtf-qt will give me the document structure (kinda like DOM for HTML). To display the document, I would then have to write the conversion of this structure to HTML, which sounds like a whole lot of work given that I just want to be able to display [simple] RTF documents in my application, not even edit them. In other words, rtf-qt will only do half the work for me.
P. S. Off-topic, but I bet you know the answer: how can I enable e-mail notification of new replies in my topics on this new forum?
-
Looking at the demo from the sources, you can load a QTextDocument with the content of the RTF file and then use QTextEdit to show it.
I do, it's one of the first thing I search :) Go to your profile, then settings, and it's under e-mail
-
Looking at the demo from the sources, you can load a QTextDocument with the content of the RTF file and then use QTextEdit to show it.
I do, it's one of the first thing I search :) Go to your profile, then settings, and it's under e-mail
wrote on 6 Apr 2015, 05:49 last edited by Violet Giraffe 4 Jun 2015, 05:49What demo are you talking about? I don't see a way to load RTF in the QTextDocument API.
-
The demo in qt-rtf sources here
1/8