Results 1 to 11 of 11

Thread: RTF editor

  1. #1
    Join Date
    Feb 2006
    Posts
    24
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default RTF editor

    I need to develop RTF editor in QT, any ideas, sample, tutorials will be of greate help

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: RTF editor

    Look into Rich Text examples in your Qt folder.

  3. #3
    Join Date
    Feb 2006
    Posts
    24
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: RTF editor

    Yes i know there is a rich text editor which doesn't support RTF format.

  4. #4
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: RTF editor

    Use QTextEdit. It supports rich text.

  5. #5
    Join Date
    Feb 2006
    Posts
    24
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: RTF editor

    I am talking about .rtf format with supports document formatting and images.

  6. #6
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: RTF editor

    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.

  7. #7
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: RTF editor

    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?
    Save yourself some pain. Learn C++ before learning Qt.

  8. #8
    Join Date
    Feb 2006
    Posts
    24
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: RTF editor

    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.

  9. #9
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: RTF editor

    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.

  10. #10
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: RTF editor

    Quote Originally Posted by prakash
    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?
    Save yourself some pain. Learn C++ before learning Qt.

  11. #11
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: RTF editor

    Save yourself some pain. Learn C++ before learning Qt.

Similar Threads

  1. Help using the QTreeWidget persistent editor.
    By Billy Lee Black in forum Qt Programming
    Replies: 13
    Last Post: 18th July 2007, 19:59
  2. Model/View: Custom Persistent Editor
    By No-Nonsense in forum Qt Programming
    Replies: 2
    Last Post: 7th February 2007, 14:55
  3. FYI: Free LaTex Editor written using QT4.1 !!!
    By GreyGeek in forum Qt-based Software
    Replies: 3
    Last Post: 19th July 2006, 18:05
  4. Code editor
    By Michiel in forum Qt Programming
    Replies: 4
    Last Post: 14th March 2006, 17:20

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.