[PyQt] [PyQt3] QRegion.rects() missing
hpj at urpla.net
Tue May 13 23:54:44 BST 2008
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?)).
> That's historical - from Qt v2.
Time passes way too quick, doesn't it ;-)
> > Has anybody tackled a similar problem, and has the patch still hanging
> > around?
> > I'm pretty dump, when it comes to C++ container classes, and even
> > dumper, when it comes to combining them into sip %MethodCode, so a few
> > hints are highly appreciated.
> Just pasting in the QList<TYPE> implementation from PyQt4 into PyQt3's
> qmemarray.sip should work - and change the "QList" etc to "QMemArray".
Cool, will check tomorrow.
Phil, thanks a lot for this very valuable hint. Given all goes well, I will
attach a diff, just in case, you ever need to cut a 3.17.5 release AND
being in a very particular historic mood..
More information about the PyQt