[Qt-interest] Export QTextDocument to ODF
Iurii Gordiienko
hordi at ukr.net
Tue Sep 22 16:02:25 CEST 2009
Hi
I use next code for creating ODF-document, but I can't: 1.Change background of text. 2.Draw horizontal line.
Also, how can I center the text to horizontal (I can't find any horizontal-align function)?
--%<--------------------------
QTextDocument doc;
QTextCursor cursor(&doc);
QTextCharFormat char_fmt;
char_fmt.setBackground(Qt::red);
cursor.insertText("XXXXXX\n",char_fmt); //HOW CAN I center it?
cursor.insertHtml("<hr>");
(bool)QTextDocumentWriter("c:/xxx.odt").write(&doc);
-->%--------------------------
Qt-4.5.2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090922/bf82dfbc/attachment.html
More information about the Qt-interest-old
mailing list