[PyQt] Problems with QGraphicsSvgItem and QtCore

Gustav Magnus Vikstrøm gustavv at ifi.uio.no
Mon Oct 29 15:26:44 GMT 2007


Our application uses SVG graphics and I'm experiencing errors/segfaults
after exiting the application. Here is a sample program that reproduces
the error:

        from PyQt4.QtCore import *
        from PyQt4.QtGui import *
        from PyQt4.QtSvg import QGraphicsSvgItem
        app = QApplication([])
        scene = QGraphicsScene()
        view = QGraphicsView(scene)
        item = QGraphicsSvgItem("Bitmap_VS_SVG.svg")
Using this SVG file:

results in this error and segfault when closed:

        QObject::startTimer: QTimer can only be used with threads
        started with QThread
        Segmentation fault (core dumped)
I ran it with gdb and got the following output:


If i omit the QtCore import the program exits without errors. Has anyone
experienced similar problems? I am running Qt 4.3.2 with PyQt 4.3.1.

- Magnus Vikstrøm

More information about the PyQt mailing list