PDA

View Full Version : Loading files with text and images in TextEdit



dshan
11th January 2011, 09:34
Hi friends ,
i used QTextDocumentWriter to write the contents of TextEdit widget (images and text ) to an ODF file . And i want to read the same and display and load it inside a TextEdit to do editing and saving again ..
Please give some ideas ..

Loading HTML and TEXT files does not seem to be a problem ..

PLease guide me .

Lykurg
11th January 2011, 09:52
As far as I know you only can save the content of a text edit to odf. Not the other way around. Of course you can write your own converter, but there is no Qt out of the box odf to text edit.


EDIT: And for how to do it: ODF is an archive of XML files, so open the content.xml (I guess it is called so) and parse it. Then insert the content to the edit like you will.