Details
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
Issue Links
- is duplicated by
-
PYSIDE-2143 QSGGeometry.vertexDataAsPoint2D() returns single point not list
- Closed
For Gerrit Dashboard: PYSIDE-1345 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
306927,1 | WIP: quick: new vertexDataAsPoint2D that returns a list | 5.15 | pyside/pyside-setup | Status: ABANDONED | -2 | 0 |
447311,8 | PySide6: Add vertexDataAsPoint2D()/setVertexDataAsPoint2D() | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
447667,3 | Documentation: Make note about QSGGeometry storing a reference to the attribute more prominent | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
447721,5 | PySide6: Add some ownership modifications for the QSGGeometry example | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
448189,2 | Documentation: Make note about QSGGeometry storing a reference to the attribute more prominent | 6.4 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
448195,2 | Documentation: Make note about QSGGeometry storing a reference to the attribute more prominent | tqtc/lts-6.2 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |
449610,4 | Add the Quick custom geometry example | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |