Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-441

infinite __getitem__ loop in QGraphicsObject.parentItem

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.9
    • 1.2.2
    • PySide
    • 6744b9dd4629637b417ba4a9fed1d56e8a70fe6f

    Description

      I have a QGraphicsObject subclass with __getitem__ implemented. Calling parentItem() on instances of this class leads to an infinite loop calling __getitem__. Example:

          from PySide import QtGui, QtCore
          app = QtGui.QApplication([])
          class O(QtGui.QGraphicsObject):
              def __getitem__(self, *args):
                  print "getitem called:", args
      
          o1 = O()
          o2 = O()
          o2.setParentItem(o1)
          print o2.parentItem()
      

      Is there any way to work around this?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            lcampagn Luke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes