We have a report that we are building and certain pieces of information are stored in html from a QTextEdit. When we build the report we load the html data in a QTextDocument.

We paint it to the form by using its drawContents method and passing the active QPainter as its parameter. I believe second parameter is the bounding rectangle that corresponds to coordinate system of the QPainter's attached device (QPrinter, QWidget, etc).

When we see the results, though, it is not what we expect. The contents are anchored to the top left corner and we were wondering how you can move the contents to other arbitrary positions. I have seen posts about using QAbstractTextLayout, but not sure what I would be looking for. Im not looking for a solution, but really only a point in the right direction.

Thanks in advance,
Kevin