QTextDocument using TableHeaderRowCount with html contents
-
Hi, we are using
QTextDocument::print(QPdfWriter*)
to print html contents to pdf. In our documents we use tables. See the attached pdf screenshot for example.The problem is when the table is at the end of the page and it's size is too big, instead of moving this table to the next page,
QTextDocument
splits the table in two parts. I've read that this can be prevented by setting theTableHeaderRowCount
to number of rows, and it actually worked when usingQTextCursor::insertTable
, but we create our document from the html.What is the best way to prevent table splitting in
QTextDocument
with html contents? -
Hi and welcome to devnet,
If memory serves well, you will have to do the math yourself.
-
The usual way is to modify the copy and then reapply it.