[PyQt] Problems with QGraphicsSvgItem and QtCore

Phil Thompson phil at riverbankcomputing.co.uk
Mon Oct 29 17:32:38 GMT 2007


On Monday 29 October 2007, Gustav Magnus Vikstrøm wrote:
> Hi
>
> 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")
>         scene.addItem(item)
>
>         view.show()
>         app.exec_()
>
> Using this SVG file:
>        
> http://upload.wikimedia.org/wikipedia/commons/6/6b/Bitmap_VS_SVG.svg
>
> 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:
>
>         http://pastebin.com/m51f87da8
>
> 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.

I think this is fixed in the current snapshot.

Phil



More information about the PyQt mailing list