[PySide] [Pyside] Inheritance error.
Lucas Tanure
ltanure at gmail.com
Sun Mar 30 21:32:04 CEST 2014
Code:
################################
from PySide import QtCore, QtGui
import sys
class AGraphicsScene(QtGui.QGraphicsScene):
def __init__(self, parent=None):
super(AGraphicsScene, self).__init__(parent)
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
A = AGraphicsScene()
tt = QtGui.QGraphicsPixmapItem(None, A)
exit()
sys.exit(app.exec_())
#################################
Error:
#################################
tanure at archDesk ~ $ python2 inheritance.py
Traceback (most recent call last):
File "inheritance.py", line 13, in <module>
tt = QtGui.QGraphicsPixmapItem(None, A)
TypeError: 'PySide.QtGui.QGraphicsPixmapItem' called with wrong argument
types:
PySide.QtGui.QGraphicsPixmapItem(NoneType, AGraphicsScene)
Supported signatures:
PySide.QtGui.QGraphicsPixmapItem(PySide.QtGui.QGraphicsItem = None,
PySide.QtGui.QGraphicsScene = None)
PySide.QtGui.QGraphicsPixmapItem(PySide.QtGui.QPixmap,
PySide.QtGui.QGraphicsItem = None, PySide.QtGui.QGraphicsScene = None)
#################################
Why ?
--
Lucas A. Tanure Alves
+55 (19) 988176559
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140330/68073cce/attachment.html>
More information about the PySide
mailing list