[PyKDE] PyQt4 Update
phil at riverbankcomputing.co.uk
Mon Dec 5 08:21:20 GMT 2005
On Monday 05 December 2005 1:06 am, Baz Walter wrote:
> 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.
It's in the current snapshot and tetrix has been updated to take advantage.
More information about the PyQt