Hello,

I've created a widget as an overlay over a QTextEdit. I've painted on the Overlay to draw shapes, etc. on the QTextEdit. Now I'd like to print the QTextEdit with the Overlay as well. I'd like the QTextEdit broken up to pages, etc. that is normally done when printing. I see that QTextDocument has a function void drawContents(QPainter * p, const QRectF & rect = QRectF()) that looks useful. But I'm not quite sure how to proceed. Any ideas of how to print the (paginated) document with the overlay printed as well? Thanks.

Josh