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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -