[PyKDE] qtcanvas problems, again

cavallo at kip.uni-heidelberg.de cavallo at kip.uni-heidelberg.de
Thu Apr 18 12:49:49 BST 2002


I've read all the messages posted in the archive on this mailing list and
i cannot figure out why this code doesnt work:

import sys
import qt
import qtcanvas

main=qt.QApplication(sys.argv)

canvas=qtcanvas.QCanvas(800,600)
canvasview=qtcanvas.QCanvasView(canvas)
item=qtcanvas.QCanvasEllipse(20,20,canvas)
item.setX(50)
item.setY(50)
item.show()
canvasview.show()

main.exec_loop()

It displays simply a white canvas, but no ellipse: i read that the reason
is in the creation/destructuion in the item object but i cannot understand
it very much,


thanks in advance,
antonio cavallo

ps. i'm using pyqt 3.1 compiled on a suse 7.3 box





More information about the PyQt mailing list