[PyQt] Getting a SystemError: error return without exception set
when I try to do QGraphicsScene.addItem(QGraphicsItem)
dizou
di_zou at yahoo.com
Fri Dec 11 18:15:19 GMT 2009
I have a widget that creates two objects, DisplayScene and DisplayView.
DisplayScene inherits from the QGraphicsScene class, and DisplayView
inherits from the QGraphicsView class. I also have MyItem that inherits from
the QGraphicsItem class. When I run this program and the DisplayScene.Read
method is called I create a MyItem object and I try to add it to the
DisplayScene. When I do this I get this error:
SystemError: error return without exception set
Here is my code:
class MainWidget(QWidget):
def __init__(self):
QWidget.__init__(self)
self.display = DisplayScene(self)
self.view = DisplayView(self.display)
self.view.show()
self.display.Read()
class MyItem(QTreeWidgetItem, QGraphicsItem):
def __init__(self, parent=None):
QTreeWidgetItem.__init__(self, parent)
QGraphicsItem.__init__(self)
class DisplayScene(QGraphicsScene):
def __init__(self, parent):
QGraphicsScene.__init__(self, parent)
def Read(self):
test =MyItem()
self.addItem(test)
--
View this message in context: http://old.nabble.com/Getting-a-SystemError%3A-error-return-without-exception-set-when-I-try-to-do-QGraphicsScene.addItem%28QGraphicsItem%29-tp26749026p26749026.html
Sent from the PyQt mailing list archive at Nabble.com.
More information about the PyQt
mailing list