[Interest] QPrinter odd/even margins instead of left/right margins

Josh Grauman jnfo-d at grauman.com
Tue Feb 20 19:00:57 CET 2024


Hello,

I don't see any ability to set the page margins differently for odd and 
even pages. I'm wondering if anyone has implemented this and how they went 
about it?

I create a QPrinter and then paint on it with a QPainter. From what I 
tried preliminarily, it doesn't work to keep calling 
QPrinter::setPageMargins() after every QPrinter::newPage(). I suppose I 
could set the margins to the minimum left/right margin, and then adjust 
the painting for each page, but I'm wondering if there is a better way to 
do it. Thanks,

Josh


More information about the Interest mailing list