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.
  • R Offline
    R Offline
    Roy44
    wrote on 17 Feb 2017, 20:11 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

    M 1 Reply Last reply 18 Feb 2017, 12:10
    0
    • R Roy44
      17 Feb 2017, 20:11

      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

      M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 18 Feb 2017, 12:10 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
      • R Offline
        R Offline
        Roy44
        wrote on 18 Feb 2017, 15:34 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.

        M 1 Reply Last reply 18 Feb 2017, 15:35
        0
        • R Roy44
          18 Feb 2017, 15:34

          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.

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 18 Feb 2017, 15:35 last edited by
          #4

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

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Roy44
            wrote on 21 Feb 2017, 19:05 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.

            M 1 Reply Last reply 21 Feb 2017, 21:01
            0
            • R Roy44
              21 Feb 2017, 19:05

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

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 21 Feb 2017, 21:01 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

              1/6

              17 Feb 2017, 20:11

              • Login

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