[PyKDE] Program crash using QCanvasRectangle

Phil Thompson phil at river-bank.demon.co.uk
Tue Apr 23 11:05:37 BST 2002


"Kaercher, Joerg" wrote:
> 
> Hi,
> 
> I have installed PyQt-3.0 (patch level 4; Qt 3.0.3; MS Visual Studio 6)
> under Windows 2K. Using the QCanvas classes I discovered that calling the
> brush() method in QCanvasRectangle causes the whole application to crash.
> Here is an example program:
> 
> import qt
> import qtcanvas
> import sys
> 
> a=qt.QApplication(sys.argv)
> 
> c=qtcanvas.QCanvas(256,256)
> v=qtcanvas.QCanvasView(c)
> 
> list=[]
> for n in range(0,100,10):
>         list.append(qtcanvas.QCanvasRectangle(10+n,10+n,50,50,c))
>         print 'pen()'
>         print list[-1].pen()
>         print 'brush()'
>         print list[-1].brush()
>         print 'show()'
>         list[-1].show()
> 
> a.setMainWidget(v)
> v.show()
> a.exec_loop()
> 
> Did anybody else have the same problem?

I've just got round to testing this with the latest 3.2rc and didn't
have a problem.

Phil




More information about the PyQt mailing list