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

vertexDataAsPoint2D() in QSGGeometry returns only one point

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.0
    • 5.14.2, 5.15.0
    • PySide, Shiboken
    • None
    • c6e294f7a (dev), 02c7a4a5c (6.4), bad34b4d7 (tqtc/lts-6.2), c05672ad6 (dev), d3e101172 (dev), 054feeeb0 (dev)

    Description

      trying to create Scene Graph - Custom Geometry (https://doc.qt.io/qt-5/qtquick-scenegraph-customgeometry-example.html)  in Pyside2, but getting following error :
        File "/BezierCurveProj/main.py", line 119, in updatePaintNode
          vertices[i].set(x, y)
      TypeError: 'PySide2.QtQuick.QSGGeometry.Point2D' object is not subscriptable

       

      I understand that vertexDataAsPoint2D() returns only one point2D. From the documentation it should return a pointer. I am unclear how to access the other points. Please find attached my project.

      Attachments

        1. BezierCurveProj.zip
          4 kB
        2. pyside1345_diag.diff
          2 kB
        3. pyside1345.zip
          3 kB

        Issue Links

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

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              advig Aditya Vignesh
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: