Search code examples
c++qtqtexteditqtextdocument

Customize page number when printing a QTextDocument


I'm trying to print the content of a QTextEdit. For that I'm using QTextDocument::print(QPrinter*). Doing that, a page number is automatically added at the right bottom of the page.

Is there any way to change its format / move it / get rid of it?

Thanks.


Solution

  • As far as I know that is hard coded into Qt, so you can't change it.

    Have a look at QTBUG-1688. There you see that this fact has already been reported, but they don't seem to work on it. So you will have to do it yourself, I think.