python 2.7 - QGraphicsScene crashes PyQt4 -
- windows xp
- python 2.7
- pyqt 4
when run following code inside python interactive shell
from pyqt4 import qtgui qtgui.qgraphicsscene()
python crashes.
why?
you need create qapplication
first before can use of qt gui elements.
it's done this:
from pyqt4 import qtgui import sys qapp = qtgui.qapplication(sys.argv) scene = qtgui.qgraphicsscene() ... qapp.exec_()
Comments
Post a Comment