From kde-devel Sun Dec 03 18:14:34 2000 From: Peter Putzer Date: Sun, 03 Dec 2000 18:14:34 +0000 To: kde-devel Subject: Printing with QSimpleRichText X-MARC-Message: https://marc.info/?l=kde-devel&m=97586737506140 I'd like to use a QSimpleRichText object (created with a "verticalBreak" > 0) to print a richtext document, yet only the first page is actually printed. As the real printing is done in QRichText (an undocumented internal class) I haven't been able to really understand what's going wrong. Anyone got an idea? Here's my code: QPainter p (&prt); QPaintDeviceMetrics pm (&prt); const int height = pm.height(); const int width = pm.width(); QSimpleRichText* rich = new QSimpleRichText (mView->xmlLog(), QFont("times"), QString::null, ksv::styleSheet(), QMimeSourceFactory::defaultFactory(), height); rich->setWidth (&p, width); // kdDebug(3000) << mView->xmlLog() << endl; QRegion region (0, 0, width, height); rich->draw (&p, 0, 0, region, palette(), 0L); prt.newPage(); delete rich; rich = 0L; bye, Peter PS: I've also tried different clipping regions, to no avail... >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<