[Interest] Sensor availableDataRates?
Lorn Potter
lorn.potter at gmail.com
Thu Apr 16 21:42:33 CEST 2015
Hi,
> On 16 Apr 2015, at 8:22 am, Jason H <jhihn at gmx.com> wrote:
>
> In QML, there is a data rate QList<range> property, which is a typedef for a QPair
>
> How in JS can I see this?
> I tried a for loop to print availibleDataRates[i], all that gives me is an object. How can I print these in JS?
> I would figure availibleDataRates[i].first, availibleDataRates[i].second?
>
In qml, availableDataRates returns a QQmlListProperty<QmlSensorRange>
and QmlSensorRange is an object with values minimum and maximum
so you can do something like:
var i = 0
for (i; i < accel.availableDataRates.length; i++) {
console.log("rates: " + accel.availableDataRates[i].minimum + " " + accel.availableDataRates[i].maximum)
}
hope this helps!
More information about the Interest
mailing list