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.