[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Printing with QSimpleRichText
From:       Peter Putzer <pputzer () edu ! uni-klu ! ac ! at>
Date:       2000-12-03 18:14:34
[Download RAW message or body]


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 <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic