QPrinter pagination
-
I'm going to print some long html table using a
QTextDocument. On each page I will put a header and a footer. I'm able to paint all the stuff on the page, but I don't understand how to split pages.The data source for each table is a
QList<MyStruct>. The structure contains all the data to be printed, say each item is one row. Right now I'm iterating theQListand append to the html the<tr>/<td>tags. When I reach the bottom of a page I should issue a page break and continue on the following one. But how I can know I'm reaching the bottom margin? -
Hi
Did you try the
http://doc.qt.io/qt-5/qtextdocument.html#print
It can split into pages, but im not sure how good it is with one big table. -
Hi
Did you try the
http://doc.qt.io/qt-5/qtextdocument.html#print
It can split into pages, but im not sure how good it is with one big table.