Mathias s
Mathias s

Reputation: 61

Getting data from QPointF in QML

I am pushing plotted data from a chart in an array, the data at the end looks like this:

qml: [QPointF(0, 0.5),QPointF(0, 0.25),QPointF(0, 0.61),QPointF(0, 1),QPointF(0, 0.1),QPointF(0, 0.67),QPointF(0, 0.12)]

How to access the y point in this case? I want to get the max and min for all points.

Upvotes: 1

Views: 2154

Answers (1)

Amfasis
Amfasis

Reputation: 4168

You can simply use .x and .y

example:

property var mypoint : <from C++ or anywhere>
property real myX : mypoint.x
property real myY : mypoint.y

Upvotes: 3

Related Questions