[PyQt] Re: Note about setting setting painters with gradients instead of brushes

Phil Thompson phil at riverbankcomputing.co.uk
Tue Sep 4 09:50:27 BST 2007


On Tuesday 04 September 2007, Sundance wrote:
> Phil Thompson wrote:
> > Works fine for me.
>
> Doesn't work for me though:
>
> sundance at bilbo:~$ python test.py
> no workaround
> Traceback (most recent call last):
>   File "test.py", line 49, in paintEvent
>     painter.setBrush(g)
> TypeError: argument 1 of QPainter.setBrush() has an invalid type
> QPaintEngine::setSystemRect: Should not be changed while engine is
> active
> QPaintEngine::setSystemClip: Should not be changed while engine is
> active
> QPaintEngine::setSystemClip: Should not be changed while engine is
> active
> QPaintEngine::setSystemClip: Should not be changed while engine is
> active
>
> That's on Kubuntu with PyQt 4.1 and SIP 4.5.

I've already said that you need PyQt 4.2 or later.

Phil


More information about the PyQt mailing list