Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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