How to decode HTML Entities in Qt



  • Hi guy:

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

    thank you


  • Moderators

    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.