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?
Forum Updated to NodeBB v4.3 + New Features

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 2 Watching
  • 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 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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
      1
      • SGaistS SGaist

        Hi,

        You should take a look at Calligra IIRC they support rtf

        V Offline
        V Offline
        Violet Giraffe
        wrote on 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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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
          0
          • SGaistS SGaist

            Sounds like it fit your needs, correct ?

            V Offline
            V Offline
            Violet Giraffe
            wrote on last edited by Violet Giraffe
            #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
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 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
              1
              • SGaistS SGaist

                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 last edited by Violet Giraffe
                #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
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 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

                  • Login

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