I am trying to build an application that would display rich text documents in paginated fashion - more or less like MS Word does. For now, I would like to have only one page displayed at a time.
From this question I have learned that I need to represent the document by QTextDocument. While the author of the question focuses more on the view representation, I would like to learn about accessing document data in paginated fashion. I can see that the class has methods such as setPageSize()
and pageCount()
. Calling setPageSize()
seems to update pageCount()
accordingly.
The problem is I do not know how to access the contents of a chosen page to have it displayed in QtextEdit.
(I am accessing Qt from Python by means of PySide library)