Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Existing open-source solutions for displaying RTF text in a Qt application?

Existing open-source solutions for displaying RTF text in a Qt application?

Scheduled Pinned Locked Moved General and Desktop
8 Posts 2 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Violet Giraffe
    wrote on 28 Mar 2015, 20:08 last edited by
    #1

    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?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 28 Mar 2015, 21:07 last edited by
      #2

      Hi,

      You should take a look at Calligra IIRC they support rtf

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      V 1 Reply Last reply 30 Mar 2015, 10:04
      1
      • S SGaist
        28 Mar 2015, 21:07

        Hi,

        You should take a look at Calligra IIRC they support rtf

        V Offline
        V Offline
        Violet Giraffe
        wrote on 30 Mar 2015, 10:04 last edited by
        #3

        @SGaist , thanks. It looks like they're using rtf-qt, which is an RTF parser, but not a converter.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 30 Mar 2015, 22:03 last edited by
          #4

          Sounds like it fit your needs, correct ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          V 1 Reply Last reply 4 Apr 2015, 08:05
          0
          • S SGaist
            30 Mar 2015, 22:03

            Sounds like it fit your needs, correct ?

            V Offline
            V Offline
            Violet Giraffe
            wrote on 4 Apr 2015, 08:05 last edited by Violet Giraffe 4 Apr 2015, 08:11
            #5

            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?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 4 Apr 2015, 21:53 last edited by
              #6

              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

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              V 1 Reply Last reply 6 Apr 2015, 05:49
              1
              • S SGaist
                4 Apr 2015, 21:53

                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

                V Offline
                V Offline
                Violet Giraffe
                wrote on 6 Apr 2015, 05:49 last edited by Violet Giraffe 4 Jun 2015, 05:49
                #7

                What demo are you talking about? I don't see a way to load RTF in the QTextDocument API.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 6 Apr 2015, 21:36 last edited by
                  #8

                  The demo in qt-rtf sources here

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1

                  1/8

                  28 Mar 2015, 20:08

                  • Login

                  • Login or register to search.
                  1 out of 8
                  • First post
                    1/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved