I'm working with the QT Creator and I would like to write a HTML code into a QString or to set a textEdit with setHtml(). The problem is, that I cannot really escape the special characters that come with the HTML code, e.g. :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC- html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'.Lucida Grande UI'; font-size:13pt; font-weight:400; font-style:normal;"> How can I write something like this to a QString or directly set it to the textEdit?
I need this because my HTML text may change.