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

Phil Thompson phil at riverbankcomputing.com
Tue May 13 23:13:23 BST 2008


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.

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

Phil


More information about the PyQt mailing list