[Qt] QRegion attn. Den

zeljko zeljko at holobit.net
Sun Jul 10 09:13:21 CEST 2011

On Saturday 09 of July 2011 23:37:35 Den Jean wrote:
> On Saturday 09 July 2011 10:46:26 zeljko wrote:
> > Is there any chance to get QRegion::rects() into bindings ?
> > I need it because of http://bugs.freepascal.org/view.php?id=19698, need
> > to do heavy debug over ExcludeClipRect, since there could be hundreds of
> > rects, and I'm suspecting that Qt adds to substract already existing
> > rect (so they are duplicates, but creates huge overhead since QPainter
> > have to take into account all of those rects into account). Please,
> > answer me asap ... or at least give me idea how to make result of this
> > function QVector<QRect>QRegion::rects() const;, so I'll add it to my
> > bindings manually for testing purposes.
> I will look into it, but again, this is a QVector<QRect> (no pointers)
> so I should write something that copies the values to new allocated
> ones, so that is alot of overhead. For AvailablePrinters I do this
> but that one is not a time constrained function.

No, you don't need to spend time over this. I've googled a lot yesterday and 
that's Qt performance issue. Number of rects is ok (compared same example with 
gtk2). I've added some tricks which are used by webkit ppl to get better 
performance, but solution is to use graphicssystem raster, not native.
Anyway from qt-4.8, raster will be default graphicssystem on X11.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/qt/attachments/20110710/dc40c2f9/attachment-0002.html>

More information about the Qt mailing list