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

Subclassing and adding QVector3d causes infinite recursion

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.12.0, 6.0
    • 1.1.2
    • PySide
    • Ubuntu raring
    • 0a70c8485771ae8cc62faaa775b1db2a5dbd95ef (pyside/pyside-setup/5.12)

    Description

      Subclassing a QVector3D and adding the subclass to the QVector causes a RuntimeError: maximum recursion depth exceeded while calling a Python object

      Minimum test case:

      >>> from PySide.QtGui import QVector3D
      >>> class Vector(QVector3D):
      ... pass
      ...
      >>> v1 = Vector(1,2,3)
      >>> v2 = QVector3D(1,2,3)
      >>> v1+v1
      PySide.QtGui.QVector3D(2.000000, 4.000000, 6.000000)
      >>> v2+v2
      PySide.QtGui.QVector3D(2.000000, 4.000000, 6.000000)
      >>> v1+v2
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      RuntimeError: maximum recursion depth exceeded while calling a Python object

      See this bug in pyqtgraph for the original report:
      https://bugs.launchpad.net/pyqtgraph/+bug/1223173

      Attachments

        For Gerrit Dashboard: PYSIDE-192
        # Subject Branch Project Status CR V

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            cycoj Jochen Schroeder
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes