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. How to decode HTML Entities in Qt
Forum Updated to NodeBB v4.3 + New Features

How to decode HTML Entities in Qt

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.3k 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.
  • S Offline
    S Offline
    s7ck4
    wrote on 10 Jun 2014, 05:43 last edited by
    #1

    Hi guy:

    I'm using Qt4.8 and got code like this 高德
    How to decode these HTML Entities?

    thank you

    1 Reply Last reply
    0
    • C Online
      C Online
      Chris Kawa
      Lifetime Qt Champion
      wrote on 10 Jun 2014, 10:45 last edited by
      #2

      Hi, welcome to devnet.

      There's no Qt function (that I know of) to do that directly.

      As a workaround you can use QTextDocument for that. setHtml() and get it back with either getHtml() or getPlainText(). These should return the entities with encoding of your choosing.

      1 Reply Last reply
      0

      1/2

      10 Jun 2014, 05:43

      • Login

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