I created QTextTable:
Qt Code:
  1. QTextDocument *document=new QTextDocument(this);
  2. QTextCursor cursor(document);
  3. cursor.movePosition(QTextCursor::Start);
  4.  
  5. QTextTableCellFormat cellFormat;
  6. cellFormat.setLeftPadding(7);
  7. cellFormat.setRightPadding(7);
  8. QBrush blackBrush(Qt::SolidPattern);
  9. QTextTableFormat tableFormat;
  10. tableFormat.setAlignment(Qt::AlignLeft);
  11. tableFormat.setBorderBrush(blackBrush);
  12. tableFormat.setBorder(.5);
  13. tableFormat.setCellSpacing(0);
  14. tableFormat.setBorderStyle(QTextFrameFormat::BorderStyle_Solid);
  15. tableFormat.setAlignment(Qt::AlignLeft);
  16. tableFormat.setWidth(QTextLength(QTextLength::PercentageLength, 100));
  17.  
  18. QTextTable *table = cursor.insertTable(10,10,tableFormat);
To copy to clipboard, switch view to plain text mode 

I merged cells:
Qt Code:
  1. table->mergeCells(1,1,10,1);
To copy to clipboard, switch view to plain text mode 

How can I write vertical text in merged cells?
thanks.