QTextDocumentWriter makes the conversion easier.
For example :
QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),
"untitled",tr("Open Document (*.odf)"));
QTextDocumentWriter odfWritter(fileName);odfWritter.write(doc); // doc is QTextDocument *