PDA

View Full Version : Why doesn't QGraphicsTextItem respect QTextDocument height?



zdvdcprz
13th February 2009, 15:17
If you set a QTextDocument on a QGraphicsTextItem and then setTextWidth() and setPageSize() on the QTextDocument, the QGraphicsTextItem clips the visible text when there are more than one pages in the document.

The amount of clipping appears to be equal to the amount of padding inserted by the QTextDocument to make up the page length. As more pages are added the last line(s) of text gradually disappear.

Does anyone know why this happens and how to overcome this? I've been struggling for weeks, on and off, to find a solution.

Thanks in advance for any help.

DC