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. [SOLVED] strange output for html bold
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] strange output for html bold

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.8k 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.
  • K Offline
    K Offline
    kalster
    wrote on last edited by
    #1

    @ message = "the good <b&gt example";
    ui->textEdit->append(message);@

    the above code outputs to the textEdit...
    @the good <b&gT example@

    when it should output...
    @the good <b> example@

    is there a reason for this odd behavior. am i missing something in the code? if the code was changed to...

    @message = "the good <b&gt";@

    then the white spaces would still be removed but the <b> would be replaced with <b&gT. I have tried message.left, message.mid, and in those cases, the white spaces are still removed.

    the code does the same for html strong, eg, &lT;strong&gt, and any other html inside of &lT;and &gt.

    I need to output <b> to the textEdit. if i typed textEdit->append("<b>"); then it would not output. is there a way to type <b> with it still going to the output because &lT;and &gt just does not seem to work correctly.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Robbin
      wrote on last edited by
      #2

      Is your textEdit rich text or is it plain text one?

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kalster
        wrote on last edited by
        #3

        hi Eus. we posted at the same time. I finally discovered my error. I had a textEdit and outputting the results to that textEdit. instead, i should have had a plainTextEdit and outputting the results to it.

        1 Reply Last reply
        0

        • Login

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