PDA

View Full Version : QTextEdit - how to page break



kuku83
26th February 2013, 10:28
Hi everyone,

I have a very long rich text (html long text), and i want to display it on a QTextEdit without scrollbar, breaking the text in multiple pages (or qtextedit)

Anybody knows how can i do this?

Thanks in advance

K

MWagman
26th February 2013, 19:22
I know <DIV style=\"page-break-after:always\"></DIV> will add a page break via HTML have no idea how your context will render it - works great for making pdf's

amleto
26th February 2013, 20:49
make your own widget

kuku83
27th February 2013, 11:05
<DIV style=\"page-break-after:always\"></DIV> doesn't work with the html subset of Qt (css properties are only added to html-table)

i tried to do my own widget with QFontMetrics and generating a new QTextDocument but when I insert a block to the new QTextDocument it always append blank character :-(