PDA

View Full Version : QTextDocument/QPrinter and trailing <br>'s



Byngl
4th June 2007, 21:18
I have a QTextDocument that I want to print using the print() method. I've found that if it ends with <br>'s that the white space at the end of the document is removed. Does anyone know of a way to get the blank space to print (this is a receipt printer and the spacing is important).

e.g.
This is a test<br><br><br><br><br><br><br>
and
This is a test<br>

print exactly the same thing. If I stick a non-space character (I've tried &nbsp; with no luck) in the string, then the blank lines above it show up.
e.g.
This is a test<br><br><br><br><br><br>x<br>