Results 1 to 3 of 3

Thread: QTextDocument Table border

  1. #1
    Join Date
    Apr 2013
    Posts
    27
    Thanks
    9
    Qt products
    Qt5
    Platforms
    Windows

    Default QTextDocument Table border

    Hi,

    i am using a QTextDocument to print a report.

    This report needs to contain a table as shown here below.

    I have tried to use border-(right|left), but its being ignored.
    Is here an other solution?

    Any help is appreciated, thanks.

    FormContent.png

  2. #2
    Join Date
    Apr 2013
    Posts
    27
    Thanks
    9
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QTextDocument Table border

    Hi,

    I found 2 people that had the same problem.

    patrik08, He got the answer: "Have you tried applying a text format on the cell?"
    QTextFormat has only a property to set the total border, not the indepenend once (left, right, bottom, top)

    ChrisW67, He came to the solution: "painting the table using individual lines and bits of text or perhaps merging the text into a page-sized SVG. Hardly nice, but it'll give the ultimate in control"

    I was thinking of the solution to subclass QTextFrameFormat and add a property to set the top, right, bottom and left border. but than need i to re implement the QTextDocument print function and check if it is my subclass and that print differently. this solution does not sound right. i think even impossible.

    But i don't know how to implement the solution of chris.

    Any help is appreciated,
    Delphi

  3. #3
    Join Date
    Apr 2013
    Posts
    27
    Thanks
    9
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QTextDocument Table border

    when i use QWebkit


Similar Threads

  1. Replies: 10
    Last Post: 9th September 2013, 15:29
  2. QTextDocument table wont align
    By asweetroxxi in forum Qt Programming
    Replies: 1
    Last Post: 5th December 2012, 14:57
  3. Replies: 2
    Last Post: 21st March 2012, 14:30
  4. Replies: 1
    Last Post: 8th June 2011, 14:13
  5. Highlighting the border of cell in Table
    By ankurjain in forum Qt Programming
    Replies: 8
    Last Post: 21st March 2006, 08:20

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.