How to know end of page?
General and Desktop
3
Posts
2
Posters
1.6k
Views
1
Watching
-
QPrinter provides a pageRect() and paperRect() which you can compare against QFontMetrics of the QPainter opened on the printer instance.
I generally recommend reading the "printing with qt" tutorial of the Qt Documentation:
http://doc.qt.digia.com/qt/printing.htmlNote that for printing something that could be called a text document you'll probably have an easier life by using QTextDocument and maybe extending it (own layouts, inline elements, etc.). It already brings pagination of content and printing capabilities.