[PyQt] [PyQt3] QRegion.rects() missing

Hans-Peter Jansen hpj at urpla.net
Thu May 15 00:14:13 BST 2008


Am Mittwoch, 14. Mai 2008 schrieb Hans-Peter Jansen:
> Am Mittwoch, 14. Mai 2008 schrieb Phil Thompson:
> > On Saturday 10 May 2008 22:43:34 Hans-Peter Jansen wrote:
> > > Hi,
> > >
> > > for optimizing reasons, I'm desperately missing the QRegion.rects()
> > > method. Background is a special double buffering widget, where bitblt
> > > in the paintEvent reimplementation of the full event.rect() is
> > > painfully slow, while only a margin area is really modified. The only
> > > way to really get at the these areas is QRegion.rects(), which is not
> > > implemented in PyQt3. (By the way, even the deactivated signature in
> > > sip/qt/qregion.sip is wrong, QRegion.rects() returns a
> > > QMemArray<QRect>, not a QArray<Rect> (anymore?)).
> >
> > Just pasting in the QList<TYPE> implementation from PyQt4 into PyQt3's
> > qmemarray.sip should work - and change the "QList" etc to "QMemArray".

Phil, as promised, here's the patch. Works like a charm. I'm sure that 
without your help, I wouldn't have managed to solve this on my own. With 
your hints, it was a piece of cake... :-)

Thanks a lot,

Pete
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PyQt-x11-gpl-3.17.4-qregion-rects.diff
Type: text/x-diff
Size: 2405 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080515/faad0e99/PyQt-x11-gpl-3.17.4-qregion-rects.bin


More information about the PyQt mailing list