PDA

View Full Version : RTF editor



prakash
13th April 2006, 07:22
I need to develop RTF editor in QT, any ideas, sample, tutorials will be of greate help

Thanks.

munna
13th April 2006, 09:45
Look into Rich Text examples in your Qt folder.

prakash
13th April 2006, 12:39
Yes i know there is a rich text editor which doesn't support RTF format.

munna
13th April 2006, 12:54
Use QTextEdit. It supports rich text.

prakash
13th April 2006, 13:17
I am talking about .rtf format with supports document formatting and images.

munna
13th April 2006, 13:44
Qt does not support the RTF format used by word processors, but a rich text format that is a subset of HTML.

In your case I think you will need to write your own widget.

Chicken Blood Machine
13th April 2006, 16:51
You just need to write your own parser that reads Microsoft RTF and translates it into simple HTML (the markup used in Qt). THen use QTextEdit to display it. This will be much easier than writing your own widget.

Just out of interest - why would you want to use RTF anyway? - it's pretty much unsupported on other platforms. Or is this Windows-only?

prakash
14th April 2006, 07:08
Thanks, but i really need a full featured word editor like Word pad with supports for formatting and images. The editor is only a part of my application.

Thanks.

Brandybuck
14th April 2006, 07:22
I don't see the problem. Import the .rtf into the native format, then when done, save back into .rtf. For simple WordPad like formatting, it shouldn't be too terribly difficult. Of course, it's a helluva lot more difficult than using an off-the-shelf class, but it's better than nothing.

Chicken Blood Machine
14th April 2006, 17:04
Thanks, but i really need a full featured word editor like Word pad with supports for formatting and images. The editor is only a part of my application.

Thanks.
And what do you think QTextEdit is?

Chicken Blood Machine
14th April 2006, 17:33
Maybe this will help:

http://latex2rtf.sourceforge.net/rtfspec_45.html