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. Get RTF String from editor
Forum Updated to NodeBB v4.3 + New Features

Get RTF String from editor

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 1.6k Views 1 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.
  • Roy44R Offline
    Roy44R Offline
    Roy44
    wrote on last edited by
    #1

    Hi,

    I try to create a rich text editor. I have to get string in Rich Text format but QTextBrowser provides only
    plainText or HTML. Does a way exist to get RTF string or must I convert HTML to RTF ?
    thanks,

    Sorry for my horrible english

    mrjjM 1 Reply Last reply
    0
    • Roy44R Roy44

      Hi,

      I try to create a rich text editor. I have to get string in Rich Text format but QTextBrowser provides only
      plainText or HTML. Does a way exist to get RTF string or must I convert HTML to RTF ?
      thanks,

      Sorry for my horrible english

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      What do you mean by RTF ?
      The html format you get back is RTF
      but its not ms RTF from 1987
      https://en.wikipedia.org/wiki/Rich_Text_Format

      The RTF used is
      http://doc.qt.io/qt-5/richtext-html-subset.html

      1 Reply Last reply
      0
      • Roy44R Offline
        Roy44R Offline
        Roy44
        wrote on last edited by
        #3

        I use the library teigha to manipulate dwg file.
        In dwg text entities are unfortunately coded in RTF.
        So to create these entities I'm make a text editor.

        mrjjM 1 Reply Last reply
        0
        • Roy44R Roy44

          I use the library teigha to manipulate dwg file.
          In dwg text entities are unfortunately coded in RTF.
          So to create these entities I'm make a text editor.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Roy44
          oh dwg. cool.
          Well how much RTF does the text fields understand?

          1 Reply Last reply
          0
          • Roy44R Offline
            Roy44R Offline
            Roy44
            wrote on last edited by
            #5

            The text object is filled with a RTF string.
            This string can contains info about color, font (bold italic underlined family etc.)
            abd alignment.

            mrjjM 1 Reply Last reply
            0
            • Roy44R Roy44

              The text object is filled with a RTF string.
              This string can contains info about color, font (bold italic underlined family etc.)
              abd alignment.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Roy44
              Maybe you ccan re-use a parser and add support to QTextBrowser .
              It sounds like its the good old RTF so its other format.
              https://cgit.kde.org/koffice.git/tree/filters/kword/rtf

              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