[PyQt] Bug with latest PyQt4 (4.7.6)

Phil Thompson phil at riverbankcomputing.com
Sat Sep 11 14:08:02 BST 2010


On Sat, 11 Sep 2010 14:04:59 +0200, Alexander Nestorov
<alexandernst at gmail.com> wrote:
> I wrote a small test/example to show the bug. Here it is:
> 
> ##############################################
> from PyQt4 import *
> from PyQt4.QtCore import *
> from PyQt4.QtGui import *
> 
> print PyQt4.QtCore.PYQT_VERSION_STR
> 
> app = QApplication([""])
> app.setGraphicsSystem("raster")
> ##############################################
> 
> This will print '4.7.6' and then will crash with error:
> AttributeError: 'QApplication' object has no attribute
'setGraphicsSystem'
> 
> This same script runs perfectly with 4.7.4
> Is that a bug in PyQt4?

No.

> If "yes", how can I fix that? Or when it will be
> fixed?

Looks like you have built PyQt against an older version of Qt.

Phil


More information about the PyQt mailing list