[PyKDE] PyQt4 Update

Baz Walter bazwal at ftml.net
Mon Dec 5 01:06:41 GMT 2005

Unfortunately, On Monday 05 Dec 2005 00:33, Baz Walter wrote:
> After some further playing around with the tetrix example I have found
> another fairly minor issue which picks up on some points made later in this
> thread. There are some functions in the QPainter class which have a const
> QBrush argument but which can take a QColor due to an implicit
> QBrush(color) conversion. They all seem to work with the exception of this
> one:
> 	QPainter.fillRect(int x,int y,int w,int h,const QBrush & brush)
> When passed a QColor, this fails with "TypeError: argument 5 of
> QPainter.fillRect() has an invalid type" followed by a segmentation fault
> (sometimes). Of course, this can be cured with an explicit conversion.
> (NB: I also back-ported the tetrix example to Qt3 and got the same error).

Sorry, my bad: in fact, none of the functions work if passed a QColor instead 
of a QBrush - although the qt docs say they should (and it's done that way in 
the c++ source for the example). So this is really a missing feature in pyqt, 
rather than any kind of bug.

Baz Walter

More information about the PyQt mailing list