[PyKDE] Program crash using QCanvasRectangle

Kaercher, Joerg JKaercher at bruker-axs.com
Fri Apr 12 22:47:49 BST 2002


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?

Joerg







More information about the PyQt mailing list