How to invoke operator [] to QML?
QML and Qt Quick
1
Posts
1
Posters
914
Views
1
Watching
-
Hello everybody.
That's my question.
I've a QAbstractListModel-derived class. I need to define operator [] and use it at QtQuick side. I define this operator and use it at C++ side well, also I invoke it with Q_INVOKABLE like this:
@Q_INVOKABLE QObjectDerived * operator [] (qint32 idx);@
But @model[0] == undefined@Is there any way to invoke operator[] to QML?
Qt 5.3.0
QtQuick 2.0