Passing x,y pixel coordinates to QML
I am developing an app that has etch-a-sketch like functionality. I need to pass (x, y) pixel coordinates to QML so that lines can be drawn between the points.
I initially thought that I would create an array in QML to store the pixel coordinates. However, I understand that dynamic array functionality is limited in QML.
Any suggestions as to an efficient data structure to dynamically store (x, y) coordinates so that lines can be drawn in QML?
use mouse.x and mouse.y.
I have no issues obtaining the current (x, y) pixel coordinates. However, I have not found a suitable data structure to dynamically store 1000+ coordinates so that I can efficiently draw lines between the pixel coordinates in a for loop.
Pablo J. Rogina
Thank you for the suggestion. I will try the model list and let you know how it goes. Thanks again.