I'm trying to write simple PyQT report editor and what I need is to exactly know what sizes the page has, MS-Word like. Today I found the following link:
How to access QTextDocument pages
that shows how to use an QPrinterPreviewDialog, and it seems to be the answer to my question, but I don't know how to transform it to Python. I have no idea how to implement QPrinterPreviewDialog into a QTextEdit. I tried to read the docs but without a example it's very hard to start.