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

infinite __getitem__ loop in QGraphicsObject.parentItem

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 1.2.2, dev
    • Fix Version/s: 5.9
    • Component/s: PySide
    • Labels:
    • Commits:
      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

            Assignee:
            crmaurei Cristian Maureira-Fredes
            Reporter:
            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