[Qt] More classes needed

zeljko zeljko at holobit.net
Tue Apr 29 08:51:08 CEST 2008


On Monday 28 April 2008 23:17, Den Jean wrote:
> On Friday 25 April 2008 15:23:25 zeljko wrote:
> > Den, I need QPageSetupDialog to implement printing with qt lcl, also if U
> > have some spare time I'll need QProcess, QAbstractTextDocumentLayout
> > (this one is used to render html pages - so maybe it'll come into qt-lcl)
> > for my private
>
> Linux done.


tnx, now I see that it have PaintContext class inside, and only that is needed, seem that I'll have to write QLCLAbstractTextDocument ;)
This is code which can render HTML page  inside QTableWidget:

painter->save();
QTextDocument doc;
doc.setHtml( index.data().toString() );
QAbstractTextDocumentLayout::PaintContext context;
/* PaintContext is here */
doc.setPageSize( option.rect.size());
painter->translate(option.rect.x(), option.rect.y());
doc.documentLayout()->draw(painter, context);
painter->restore();            

Anyway tnx.

z.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/qt/attachments/20080429/3649c631/attachment-0001.html>


More information about the Qt mailing list