Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
Exporting a document to ODF: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
h1. Exporting a document to ODF | |||
Qt, the latest editions, supports the open document formats (Odf). A QTextDocument can be directly converted to odf. In fact, | Qt, the latest editions, supports the open document formats (Odf). A QTextDocument can be directly converted to odf. In fact, ODF is the default conversion format. | ||
QTextDocumentWriter makes the conversion easier. | QTextDocumentWriter makes the conversion easier. | ||
Line 7: | Line 7: | ||
For example : | For example : | ||
''' | <code>QString fileName = QFileDialog::getSaveFileName(this, tr("Save File&quot;),<br /> "untitled&quot;,tr("Open Document ('''.odf)"));<br />QTextDocumentWriter odfWritter(fileName);<br />odfWritter.write(doc); // doc is QTextDocument'''</code> | ||
'''Categories'''<br />[[snippets]] |
Revision as of 10:25, 24 February 2015
h1. Exporting a document to ODF
Qt, the latest editions, supports the open document formats (Odf). A QTextDocument can be directly converted to odf. In fact, ODF is the default conversion format.
QTextDocumentWriter makes the conversion easier.
For example :
QString fileName = QFileDialog::getSaveFileName(this, tr("Save File&quot;),<br /> "untitled&quot;,tr("Open Document ('''.odf)"));<br />QTextDocumentWriter odfWritter(fileName);<br />odfWritter.write(doc); // doc is QTextDocument'''
Categories
snippets