[PyKDE] Segfault in QGraphicsScene.drawItems
Arve Knudsen
arve.knudsen at gmail.com
Fri Feb 23 16:51:08 GMT 2007
Hello
If I try to reimplement the method drawItems in a QGraphicsScene subclass,
the program segfaults. Is this a bug in PyQt? I am by the way using PyQt
4.1.1 (self-compiled) and Qt 4.2.0 (Ubuntu). I've included a sample program
which exhibits the behaviour.
Arve
from PyQt4.QtGui import *
class _GraphicsScene(QGraphicsScene):
def __init__(self, parent):
QGraphicsScene.__init__(self, parent
def drawItems(self, *args):
""" Reimplement in order to notify observers of draw event. """
QGraphicsScene.drawItems(self, *args)
import sys, os.path
app = QApplication([])
w = QGraphicsView()
scene = _GraphicsScene(w)
w.setScene(scene)
w.show()
app.exec_()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070223/a75030a4/attachment.html
More information about the PyQt
mailing list