Nuno Santos
Nuno Santos

Reputation: 1478

How to access QQmlListProperty<T> size function from Qml?

When you implement a QQmlListProperty and defined the count and at functions you can then call this from the Qml side. For the at function I have already understand that I can use the following sintax:

collection.items[0]

However, I couldn't still understand how do I call the size/length/count function. Does any know?

Upvotes: 2

Views: 2776

Answers (1)

Nuno Santos
Nuno Santos

Reputation: 1478

I have just found the answer:

collection.length

[EDIT]

The answer is in Qt Documentation:

http://doc.qt.io/qt-5/qml-list.html

Upvotes: 3

Related Questions