/* ************** CREATING A ODT FILE **************** ************** INCLUDE THE NECESSARY FILES ********/ { ... // Text Document Object to hold formatted document QTextDocument *m_document = new QTextDocument(); // Cursor for traversing the document QTextCursor m_cursor = QTextCursor(m_document); // TextTableFormat object for table formatting QTextTableFormat tableFormat; tableFormat.setAlignment(Qt::AlignCenter); tableFormat.setCellPadding(5); tableFormat.setCellSpacing(50); tableFormat.setHeaderRowCount(0); tableFormat.setBorderStyle( QTextFrameFormat::BorderStyle_Solid); tableFormat.setWidth(QTextLength(QTextLength::PercentageLength, 60)); // Create table to hold the text and it's easy to format QTextTable *m_table= m_cursor.insertTable(10,3,tableFormat); m_table->mergeCells(0,0,1,2); m_table->mergeCells(1,0,1,2); //Lets Insert the text and Pi
Comments
Post a Comment