[Interest] opposite of QString::toEscapedHtml()

Scott Bloom scott at towel42.com
Fri Aug 11 01:55:34 CEST 2017


Is there a function, I searched and could not find anything that returns the human readable version of the string?

Where

QString origString = .....;
decodeHtml( origString.toEscapedHtml() ) == origString;

??

The biggest hack of all hacks I could find is the following

QTextDocument doc;
doc.setHtml( origString );
QString plaintext = doc.toPlainText();

Which just seems like a little bit of overkill


Scott

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170810/3c5a846e/attachment.html>


More information about the Interest mailing list