How can i put a local file including htm3 text into QTextedit???
I have an object of type QFile handling my local file....I'd like to have
QFILE----->QTEXTEDIT............!!!!!!!!!!!!!
How can i put a local file including htm3 text into QTextedit???
I have an object of type QFile handling my local file....I'd like to have
QFILE----->QTEXTEDIT............!!!!!!!!!!!!!
Last edited by dreamer; 4th May 2008 at 17:43. Reason: updated contents
The QFile is of no use here.
Read the markup from the file using a QTextStream and set it in the QTextEdit using QTextEdit::setHtml.
A simplified example:
Qt Code:
return; in.setCodec("UTF-8"); textEdit->setPlainText(in.readAll());To copy to clipboard, switch view to plain text mode
Last edited by jpn; 12th May 2008 at 13:31. Reason: missing [code] tags
Bookmarks