PDA

View Full Version : QTextEdit and Html



giusepped
28th October 2008, 08:19
Strange problem here.
I have


QString render = "<table width=\"100%\" border=0 cellspacing=0>\n"
"<tr><td height=\">eee </td></tr></table>";

render += "</table>";


detailsText->setHtml(render);


detailsText is just a QTextEdit widget.
But nothing appear in the widget.
If i put it with setPlainText() it is ok.
Why

caduel
28th October 2008, 17:20
If i put it with setPlainText() it is ok.
What does "ok" mean here?


<td height=\">
Is not correct HTML. Maybe fixing that helps.
Also, note that you add 2 </table> closing tags.

If not, try wrapping the text in <html> tags.

HTH