Results 1 to 3 of 3

Thread: How to read rtf file and display it?

  1. #1
    Join Date
    May 2009
    Posts
    15
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Cool How to read rtf file and display it?

    Hi! I want to read a file which is the rtf format.what can I do?

  2. #2
    Join Date
    Feb 2007
    Location
    Karlsruhe, Germany
    Posts
    469
    Thanks
    17
    Thanked 90 Times in 88 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to read rtf file and display it?

    Hi there!

    QTextEdit internally supports/uses html for its rich text features.

    To read Microsoft RTF files.. you will probably need some kind of conversion.

    Google revealed, that someone else ran into the same problem:

    http://stackoverflow.com/questions/2...iles-with-c-qt

    One answer points to a RTF-Tokenizer used in KWord.

    But to get that running in your project is probably quite a lot of work..

    Maybe you can reduce the number of supported tokens?

    Good luck!

    Johannes

  3. #3
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to read rtf file and display it?

    Quote Originally Posted by sunnysun520 View Post
    Hi! I want to read a file which is the rtf format.what can I do?
    You can get some RTF-reading code from TEA text editor - http://tea-editor.sourceforge.net/

Similar Threads

  1. Display File Properties [Solved]
    By DrDonut in forum Qt Programming
    Replies: 3
    Last Post: 5th May 2009, 12:45
  2. Display a file from Directory tree to show in QTextEdit
    By vvdounai in forum Qt Programming
    Replies: 1
    Last Post: 13th November 2007, 13:43
  3. Can't display .jpg,.jpeg file in my QT app
    By Shalabh in forum Qt Programming
    Replies: 3
    Last Post: 23rd April 2007, 14:52
  4. How to Read and display BMP image using QT
    By agsrinivasan in forum Qt Programming
    Replies: 3
    Last Post: 29th January 2007, 07:14
  5. How to display a file in the textBrowser
    By deekayt in forum Qt Programming
    Replies: 2
    Last Post: 26th October 2006, 19:47

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.