Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How can i append file (existing html file ) using QTextDocument
Jeroentjehome last edited by
Bit more information is needed here I think. Where do you want to append this file? Append to what??
Do you want to add the HTML file to a QTextDocument or what?
i need to add some additional lines to the html file
DerManu last edited by
Read the file into a string (with QFile and QTextStream) and then use "setHtml":http://doc.qt.nokia.com/4.7-snapshot/qtextdocument.html#setHtml
Or if your question was how to append a file to an existing QTextDocument, use "insertHtml":http://doc.qt.nokia.com/4.7-snapshot/qtextcursor.html#insertHtml . It helps when you state more clearly what you actually want to do and what you have tried already.
thank u fro ur reply i will tyr setHtml function.
morpe last edited by
@Vidhya, did you succede in your attempt?
In my case, I want to append audio but it appears Qt 4.8 lib doesn't support HTML5 tag. Is there anyway around this limitation?
Any advice would be highly appriciated.