Results 1 to 3 of 3

Thread: vertical text in a QTextTable

  1. #1
    Join Date
    Jan 2013
    Posts
    23
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default vertical text in a QTextTable

    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.

  2. #2
    Join Date
    Nov 2012
    Posts
    21
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: vertical text in a QTextTable

    If you can't via a QTextCharFormat you can always implement your own QTextObject via QTextObjectInterface and use that.

  3. #3
    Join Date
    Jan 2013
    Posts
    23
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: vertical text in a QTextTable

    @gemmell can you give some detailed information?

Similar Threads

  1. vertical pushbutton text
    By eric in forum Qt Programming
    Replies: 11
    Last Post: 18th April 2019, 20:17
  2. QGraphicsTextItem Vertical text alignment
    By mbra in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2011, 04:12
  3. How to draw vertical text via QTextEdit
    By nifei in forum Qt Programming
    Replies: 8
    Last Post: 1st October 2010, 18:10
  4. Vertical text in a QTextDocument
    By Angelo Moriconi in forum Qt Programming
    Replies: 6
    Last Post: 7th February 2008, 06:30
  5. Vertical Orientation of Text.
    By ashukla in forum Qt Programming
    Replies: 9
    Last Post: 28th January 2008, 13:40

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.