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
Qt 6.11 is out! See what's new in the release blog

How to decode HTML Entities in Qt

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.4k 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 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
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 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

      • Login

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